Skip to content

Commit 9e4e0cd

Browse files
committed
Merge branch 'work' into tests
2 parents 7289c6a + 58a921d commit 9e4e0cd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

stdex/include/cstdint.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

stdex/include/string.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)