[Issue 9505] std.zlib seem to be bugged

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 13 09:41:40 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9505



--- Comment #4 from monarchdodra at gmail.com 2013-02-13 09:41:39 PST ---
Oh yeah, also, gzread will return -1 in case of an io error. you don't check
for that.

You'd probably want to use:

_numberRead = gzread( _file, _buffer.ptr, cast(uint)_buffer.length );
errnoEnforce(numberRead >= 0);

I can only guess a failed decompress sets an errno? Not sure.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list