From 6ede639c090aa80ba5e9b6be631b87727d741fbe Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 26 Nov 2006 00:44:26 +0000 Subject: Serializers are in debug mode, beware. --- src/serializerbinary.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/serializerbinary.cpp') diff --git a/src/serializerbinary.cpp b/src/serializerbinary.cpp index bfe3cc9..cb3c8bf 100644 --- a/src/serializerbinary.cpp +++ b/src/serializerbinary.cpp @@ -43,12 +43,15 @@ void SerializerBinary::close() void SerializerBinary::write(const void * pData, int32_t nSize) { - fwrite(pData, nSize, 1, fhFile); + uint32_t nWrite = fwrite(pData, nSize, 1, fhFile); + printf("fwrite( 0x%08X, %d, 1, fhFile ) = %u;\n", pData, nSize, nWrite ); } void SerializerBinary::read(void * pData, int32_t nSize) { - if( fread(pData, nSize, 1, fhFile) < 1 ) + uint32_t nRead = fread(pData, nSize, 1, fhFile); + printf("fread( 0x%08X, %d, 1, fhFile ) = %u;\n", pData, nSize, nRead ); + if( nRead < 1 ) { throw FileException( excodeEOF, "End of file read"); } -- cgit v1.2.3