You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When parsing the vehicles array in the json input, we loop over vehicles and use check_id which throws whenever encountering a non-object (e.g. a string). As a result, this kind of input is normally handled as an input error:
Now the fun fact is that if we exchange order for the first two values in vehicles, we hit a Rapidjson assert related to "foo" not being an object.
This is due to an earlier call to get_amount_size which tries to access the capacity value without prior check for having a valid json object.
Extra bonus fixing point: inline get_amount_size and get rid of the loop on vehicles, it's not necessary because we enforce amount size consistency down the line when adding vehicles/jobs.
The text was updated successfully, but these errors were encountered:
When parsing the
vehicles
array in the json input, we loop over vehicles and usecheck_id
which throws whenever encountering a non-object (e.g. a string). As a result, this kind of input is normally handled as an input error:Now the fun fact is that if we exchange order for the first two values in
vehicles
, we hit a Rapidjson assert related to"foo"
not being an object.This is due to an earlier call to
get_amount_size
which tries to access thecapacity
value without prior check for having a valid json object.Extra bonus fixing point: inline
get_amount_size
and get rid of the loop onvehicles
, it's not necessary because we enforce amount size consistency down the line when adding vehicles/jobs.The text was updated successfully, but these errors were encountered: