From Pjotr Svetachov, "Today I found a bug in the IutputStream class when saving array
attributes in vec3b format. It looks like my compiler takes the wrong overload and outputs integers instead of characters. The problem is that vec3b is of type signed char and that is not the same as char ( see http://stackoverflow.com/questions/436513/char-signed-char-char-unsigned-char ) and visual studio 2013 will promote it to integer when choosing an overload. It looks like that the InputStream class already takes care of this issue (if it didn't it would have read everything ok and I would have not even stumbled upon this bug. :) )"
This commit is contained in:
parent
fa6f5219bf
commit
b6404d18c3
@ -92,6 +92,7 @@ public:
|
||||
// Serialization related functions
|
||||
OutputStream& operator<<( bool b ) { _out->writeBool(b); return *this; }
|
||||
OutputStream& operator<<( char c ) { _out->writeChar(c); return *this; }
|
||||
OutputStream& operator<<( signed char c) { _out->writeChar(c); return *this; }
|
||||
OutputStream& operator<<( unsigned char c ) { _out->writeUChar(c); return *this; }
|
||||
OutputStream& operator<<( short s ) { _out->writeShort(s); return *this; }
|
||||
OutputStream& operator<<( unsigned short s ) { _out->writeUShort(s); return *this; }
|
||||
|
Loading…
Reference in New Issue
Block a user