Skip to content

Commit

Permalink
fix signed value check in Arguments::get
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzziqersoftware committed Nov 25, 2023
1 parent 23c1e67 commit 9bbec3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Arguments.hh
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private:
}
return uv;
} else {
if (((uv & (~mask_for_type<RetT>)) != 0) && ((uv & (~mask_for_type<RetT>)) != (~mask_for_type<RetT>))) {
if (((uv & (~(mask_for_type<RetT> >> 1))) != 0) && ((uv & (~(mask_for_type<RetT> >> 1))) != (~(mask_for_type<RetT> >> 1)))) {
throw std::invalid_argument(exc_prefix(id) + "signed value out of range");
}
return v;
Expand Down

0 comments on commit 9bbec3b

Please sign in to comment.