aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/serializerbinary.cpp7
-rw-r--r--src/serializertext.cpp2
-rw-r--r--src/serializertext.h2
3 files changed, 7 insertions, 4 deletions
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()
43 43
44void SerializerBinary::write(const void * pData, int32_t nSize) 44void SerializerBinary::write(const void * pData, int32_t nSize)
45{ 45{
46 fwrite(pData, nSize, 1, fhFile); 46 uint32_t nWrite = fwrite(pData, nSize, 1, fhFile);
47 printf("fwrite( 0x%08X, %d, 1, fhFile ) = %u;\n", pData, nSize, nWrite );
47} 48}
48 49
49void SerializerBinary::read(void * pData, int32_t nSize) 50void SerializerBinary::read(void * pData, int32_t nSize)
50{ 51{
51 if( fread(pData, nSize, 1, fhFile) < 1 ) 52 uint32_t nRead = fread(pData, nSize, 1, fhFile);
53 printf("fread( 0x%08X, %d, 1, fhFile ) = %u;\n", pData, nSize, nRead );
54 if( nRead < 1 )
52 { 55 {
53 throw FileException( excodeEOF, "End of file read"); 56 throw FileException( excodeEOF, "End of file read");
54 } 57 }
diff --git a/src/serializertext.cpp b/src/serializertext.cpp
index f758bf8..9cf4394 100644
--- a/src/serializertext.cpp
+++ b/src/serializertext.cpp
@@ -7,7 +7,7 @@ SerializerText::SerializerText(FILE *fhFile, bool bLoading):
7{ 7{
8} 8}
9 9
10SerializerText::SerializerText(char *sFileName, bool bLoading): 10SerializerText::SerializerText(const char *sFileName, bool bLoading):
11 Serializer(bLoading), 11 Serializer(bLoading),
12 bCloseFile(true) 12 bCloseFile(true)
13{ 13{
diff --git a/src/serializertext.h b/src/serializertext.h
index 46be421..01b7f7b 100644
--- a/src/serializertext.h
+++ b/src/serializertext.h
@@ -8,7 +8,7 @@ class SerializerText : public Serializer
8{ 8{
9public: 9public:
10 SerializerText(FILE *fhFile, bool bLoading); 10 SerializerText(FILE *fhFile, bool bLoading);
11 SerializerText(char *sFileName, bool bLoading); 11 SerializerText(const char *sFileName, bool bLoading);
12 virtual ~SerializerText(); 12 virtual ~SerializerText();
13 13
14 virtual void close(); 14 virtual void close();