Fixed parsing of "false"

This commit is contained in:
Julien JEMINE 2022-12-09 13:26:27 +01:00
parent 16cda3321e
commit 919f97185c

View File

@ -126,7 +126,7 @@ public:
auto type = Wrapper::Class::getType();
oatpp::parser::Caret caret(str);
auto result = read(caret, type).template cast<Wrapper>();
if(!result) {
if(result == nullptr) {
throw oatpp::parser::ParsingError(caret.getErrorMessage(), caret.getErrorCode(), caret.getPosition());
}
return result;