mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Fix jsonfindptrs "internal error" false positive
This commit is contained in:
1 parent
dee65c0e61
commit
e915543f09
3 files changed
+10
-1
No files matched your search
@@ -786,6 +786,9 @@ compute_exit_code(std::string status_msg) {
|
||||
// (other non-zero exit codes). Specifically, exit code 2 for internal
|
||||
// invariant violation, exit code 139 (which is 128 + SIGSEGV on x86_64
|
||||
// linux) for a segmentation fault (e.g. null pointer dereference).
|
||||
if (size_t i = status_msg.find('='); i != std::string::npos) {
|
||||
status_msg = status_msg.substr(0, i);
|
||||
}
|
||||
return (status_msg.find("internal error:") != std::string::npos) ? 2 : 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -381,6 +381,9 @@ compute_exit_code(std::string status_msg) {
|
||||
// (other non-zero exit codes). Specifically, exit code 2 for internal
|
||||
// invariant violation, exit code 139 (which is 128 + SIGSEGV on x86_64
|
||||
// linux) for a segmentation fault (e.g. null pointer dereference).
|
||||
if (size_t i = status_msg.find('='); i != std::string::npos) {
|
||||
status_msg = status_msg.substr(0, i);
|
||||
}
|
||||
return (status_msg.find("internal error:") != std::string::npos) ? 2 : 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -479,7 +479,7 @@ class Callbacks : public wuffs_aux::DecodeJsonCallbacks {
|
||||
top.has_map_key = false;
|
||||
auto iter = jmap.find(top.map_key);
|
||||
if (iter != jmap.end()) {
|
||||
return "main: duplicate key: " + top.map_key;
|
||||
return "main: duplicate key: key=" + top.map_key;
|
||||
}
|
||||
jmap.insert(iter, JsonMap::value_type(std::move(top.map_key),
|
||||
std::move(jvalue)));
|
||||
@@ -593,6 +593,9 @@ compute_exit_code(std::string status_msg) {
|
||||
// (other non-zero exit codes). Specifically, exit code 2 for internal
|
||||
// invariant violation, exit code 139 (which is 128 + SIGSEGV on x86_64
|
||||
// linux) for a segmentation fault (e.g. null pointer dereference).
|
||||
if (size_t i = status_msg.find('='); i != std::string::npos) {
|
||||
status_msg = status_msg.substr(0, i);
|
||||
}
|
||||
return (status_msg.find("internal error:") != std::string::npos) ? 2 : 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user