From ca36c76a60195bc55d96094d9da678f5c01a742b Mon Sep 17 00:00:00 2001 From: Tobiasz Laskowski Date: Tue, 24 Sep 2024 19:17:47 +0100 Subject: [PATCH] Add workaround for scalar document is_null bug For now, we can just manually throw the exception until the next simdjson bugfix release: https://github.com/simdjson/simdjson/pull/2258 --- src/luasimdjson.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/luasimdjson.cpp b/src/luasimdjson.cpp index fe7ddf9..5c55b57 100644 --- a/src/luasimdjson.cpp +++ b/src/luasimdjson.cpp @@ -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; }