mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-02-07 14:30:13 +01:00
Fix signed/unsigned comparison in json_pointer namespace
This commit is contained in:
parent
a92f8bf60a
commit
f039e269dc
@ -180,7 +180,7 @@ inline AdapterType resolveJsonPointer(
|
|||||||
"out of bounds; actual token: " + referenceToken);
|
"out of bounds; actual token: " + referenceToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index > std::numeric_limits<ptrdiff_t>::max()) {
|
if (index > static_cast<uint64_t>(std::numeric_limits<ptrdiff_t>::max())) {
|
||||||
throw std::runtime_error("Array index out of bounds; hard "
|
throw std::runtime_error("Array index out of bounds; hard "
|
||||||
"limit is " + boost::lexical_cast<std::string>(
|
"limit is " + boost::lexical_cast<std::string>(
|
||||||
std::numeric_limits<ptrdiff_t>::max()));
|
std::numeric_limits<ptrdiff_t>::max()));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user