diff --git a/src/Arguments.hh b/src/Arguments.hh index fd75e27..cf95606 100644 --- a/src/Arguments.hh +++ b/src/Arguments.hh @@ -218,7 +218,7 @@ private: } return uv; } else { - if (((uv & (~mask_for_type)) != 0) && ((uv & (~mask_for_type)) != (~mask_for_type))) { + if (((uv & (~(mask_for_type >> 1))) != 0) && ((uv & (~(mask_for_type >> 1))) != (~(mask_for_type >> 1)))) { throw std::invalid_argument(exc_prefix(id) + "signed value out of range"); } return v;