]> git.mxchange.org Git - simgear.git/commit
Proper fix for gzfilebuf choking on some files.
authorThorstenB <brehmt@gmail.com>
Sat, 10 Nov 2012 09:12:01 +0000 (10:12 +0100)
committerThorstenB <brehmt@gmail.com>
Sat, 10 Nov 2012 09:12:01 +0000 (10:12 +0100)
commit0928bca531938db3f9ea795530dfef21665c5c98
treeeded3f377dd595846335e501faf139ba5ada8801
parent77f73a79dff698a6f70bda4a2c46d59b59074aaf
Proper fix for gzfilebuf choking on some files.
When reading a new block of data, and the first byte of the new block is
0xff (_signed_ char -1), then this must be converted to _integer_ 0xff
(+255), not -1 - which would indicate an error condition (EOF==-1). All
valid _data_ character must be returned as non-negative, see
streambuf::underflow spec, or compare with
http://www.opensource.apple.com/source/zlib/zlib-12/zlib/contrib/iostream/zfstream.cpp
or
http://www.raspberryginger.com/jbailey/minix/html/zfstream_8cpp-source.html
simgear/misc/zfstream.cxx