diff options
Diffstat (limited to 'msgpack/unpack_template.h')
| -rw-r--r-- | msgpack/unpack_template.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/msgpack/unpack_template.h b/msgpack/unpack_template.h index 7a2288f..42fe3a1 100644 --- a/msgpack/unpack_template.h +++ b/msgpack/unpack_template.h @@ -82,8 +82,6 @@ msgpack_unpack_func(msgpack_unpack_object, _data)(msgpack_unpack_struct(_context msgpack_unpack_func(int, _execute)(msgpack_unpack_struct(_context)* ctx, const char* data, size_t len, size_t* off) { - assert(len >= *off); - const unsigned char* p = (unsigned char*)data + *off; const unsigned char* const pe = (unsigned char*)data + len; const void* n = NULL; @@ -91,6 +89,7 @@ msgpack_unpack_func(int, _execute)(msgpack_unpack_struct(_context)* ctx, const c unsigned int trail = ctx->trail; unsigned int cs = ctx->cs; unsigned int top = ctx->top; + msgpack_unpack_struct(_stack)* stack = ctx->stack; msgpack_unpack_user* user = &ctx->user; @@ -99,6 +98,8 @@ msgpack_unpack_func(int, _execute)(msgpack_unpack_struct(_context)* ctx, const c int ret; + assert(len >= *off); + #define push_simple_value(func) \ if(msgpack_unpack_callback(func)(user, &obj) < 0) { goto _failed; } \ goto _push |
