Skip to content

Commit

Permalink
Add workaround for scalar document is_null bug
Browse files Browse the repository at this point in the history
For now, we can just manually throw the exception until the next
simdjson bugfix release: simdjson/simdjson#2258
  • Loading branch information
tobil4sk committed Sep 24, 2024
1 parent 3941b0f commit ca36c76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/luasimdjson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ void convert_ondemand_element_to_table(lua_State *L, T& element) {
// calling is_null().value() will trigger an exception if the value is invalid
if (element.is_null().value()) {
lua_pushlightuserdata(L, NULL);
} else {
// workaround for simdjson 3.10.1
throw simdjson_error(INCORRECT_TYPE);
}
break;
}
Expand Down

0 comments on commit ca36c76

Please sign in to comment.