fix a little bug

This commit is contained in:
Hongze Cheng 2024-03-06 10:49:21 +08:00
parent dd155a52fa
commit a4e00227c5
1 changed files with 1 additions and 1 deletions

View File

@ -145,7 +145,7 @@ static FORCE_INLINE int32_t tBufferPutBinary(SBuffer *buffer, const void *data,
} }
static FORCE_INLINE int32_t tBufferPutCStr(SBuffer *buffer, const char *str) { static FORCE_INLINE int32_t tBufferPutCStr(SBuffer *buffer, const char *str) {
return tBufferPutBinary(buffer, str, str ? 0 : strlen(str) + 1); return tBufferPutBinary(buffer, str, str ? strlen(str) + 1 : 0);
} }
static FORCE_INLINE int32_t tBufferPutF32(SBuffer *buffer, float value) { static FORCE_INLINE int32_t tBufferPutF32(SBuffer *buffer, float value) {