unpack.h: fix compiler warnings, improve error handling

This commit is contained in:
Thomas Waldmann 2022-08-04 11:20:23 +02:00
parent d003046078
commit a7d4dd2ba6
1 changed files with 5 additions and 0 deletions

View File

@ -388,6 +388,11 @@ static inline int unpack_callback_raw(unpack_user* u, const char* b, const char*
u->expect = expect_map_item_end;
}
break;
default:
if(u->inside_chunks) {
SET_LAST_ERROR("Unexpected raw in chunks structure");
return -1;
}
}
return 0;
}