Fixed fwrite return value comparison.
This commit is contained in:
Takatoshi Kondo 2016-07-11 19:34:10 +09:00
parent f573fd6a26
commit d7a656523b

View File

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