diff options
-rw-r--r-- | src/serializerbinary.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/serializerbinary.cpp b/src/serializerbinary.cpp index 29e7f4b..1c0bedb 100644 --- a/src/serializerbinary.cpp +++ b/src/serializerbinary.cpp | |||
@@ -48,6 +48,9 @@ void SerializerBinary::write(const void * pData, int32_t nSize) | |||
48 | 48 | ||
49 | void SerializerBinary::read(void * pData, int32_t nSize) | 49 | void SerializerBinary::read(void * pData, int32_t nSize) |
50 | { | 50 | { |
51 | if( nSize == 0 ) | ||
52 | return; | ||
53 | |||
51 | uint32_t nRead = fread(pData, nSize, 1, fhFile); | 54 | uint32_t nRead = fread(pData, nSize, 1, fhFile); |
52 | if( nRead < 1 ) | 55 | if( nRead < 1 ) |
53 | { | 56 | { |