Fixed missing check before calling memcpy
@@ -215,10 +215,13 @@ static INLINE void Stream_Write_UINT64(wStream* _s, UINT64 _v)
*_s->pointer++ = ((UINT64)(_v) >> 56) & 0xFF;
}
static INLINE void Stream_Write(wStream* _s, const void* _b, size_t _n)
+{
+ if (_n > 0)
{
memcpy(_s->pointer, (_b), (_n));
Stream_Seek(_s, _n);
}
+}
#define Stream_Seek_UINT8(_s) Stream_Seek(_s, 1)
#define Stream_Seek_UINT16(_s) Stream_Seek(_s, 2)
