You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There, ngl_fwrite() call can return 0 or -1. If -1 is returned, done /= WordSize will result in done being 0.
Maybe all Write() wrappers should threat -1 as an error.
Going back into PipeTo, 0 can be returned from the above Write call:
piped_in -= piped_out;
total_piped += piped_out;
piped_in is never decreased, resulting in an infinite loop.
The text was updated successfully, but these errors were encountered:
When copying a file via
nglPath::Copy
,nglIStream::PipeTo
is used:Let's see
nglFile::Write
:There,
ngl_fwrite()
call can return 0 or -1. If -1 is returned,done /= WordSize
will result indone
being 0.Maybe all
Write()
wrappers should threat -1 as an error.Going back into
PipeTo
, 0 can be returned from the aboveWrite
call:piped_in
is never decreased, resulting in an infinite loop.The text was updated successfully, but these errors were encountered: