mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-15 15:16:51 +02:00
Fixed msgpack_unpack_next(), C interface, return value.
This commit is contained in:
@@ -22,7 +22,7 @@ void test()
|
|||||||
|
|
||||||
msgpack_unpacked_init(&msg);
|
msgpack_unpacked_init(&msg);
|
||||||
|
|
||||||
while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos)) {
|
while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos) == MSGPACK_UNPACK_SUCCESS) {
|
||||||
}
|
}
|
||||||
|
|
||||||
msgpack_sbuffer_destroy(&buf);
|
msgpack_sbuffer_destroy(&buf);
|
||||||
|
@@ -23,7 +23,7 @@ void test()
|
|||||||
|
|
||||||
msgpack_unpacked_init(&msg);
|
msgpack_unpacked_init(&msg);
|
||||||
|
|
||||||
while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos)) {
|
while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos) == MSGPACK_UNPACK_SUCCESS) {
|
||||||
}
|
}
|
||||||
|
|
||||||
msgpack_sbuffer_destroy(&buf);
|
msgpack_sbuffer_destroy(&buf);
|
||||||
|
Reference in New Issue
Block a user