Fixed fwrite return value comparison.
This commit is contained in:
Takatoshi Kondo 2019-09-24 16:43:15 +09:00
parent 83eb70d718
commit 4b4eb83cd1

View File

@ -25,7 +25,7 @@ extern "C" {
static inline int msgpack_fbuffer_write(void* data, const char* buf, size_t len)
{
return (len == fwrite(buf, len, 1, (FILE *)data)) ? 0 : -1;
return (1 == fwrite(buf, len, 1, (FILE *)data)) ? 0 : -1;
}
/** @} */