File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -370,7 +370,7 @@ namespace stdex
370370 template <class _Unsigned , int _Size>
371371 struct _sized_integer_umax_impl
372372 {
373- char _sized_integer_umax_size_is_invalid_assert[_Size > 0 ? 1 : (sizeof (_Unsigned) / sizeof (_Unsigned) - 3 )]; // should never ever happen!
373+ char _sized_integer_umax_size_is_invalid_assert[_Size > 0 ? 1 : (( sizeof (_Unsigned) + 1 ) / sizeof (_Unsigned) - 3 )]; // should never ever happen!
374374 static const _Unsigned umax_value = _Size > 0 ? (((_Unsigned(1 ) << (_Size - 1 )) - 1 ) * _Unsigned (2 ) + _Unsigned(1 )) : 0;
375375 };
376376
Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ namespace stdex
210210 if (errno == 0 && _str_to_integral_chooser_impl::check (value))
211211 {
212212 ptrdiff_t length =
213- endptr ? (*endptr - str) : (str - str + strlen (str));
213+ endptr ? (*endptr - str) : (str + strlen (str) - str );
214214 string positive_str (str, str + length);
215215 bool is_negative = (value == LONG_MIN);
216216
@@ -256,7 +256,7 @@ namespace stdex
256256 if (errno == 0 && _str_to_integral_chooser_impl::check (value))
257257 {
258258 ptrdiff_t length =
259- endptr ? (*endptr - str) : (str - str + wcslen (str));
259+ endptr ? (*endptr - str) : (str + wcslen (str) - str );
260260 wstring positive_str (str, str + length);
261261 bool is_negative = (value == LONG_MIN);
262262
You can’t perform that action at this time.
0 commit comments