diff options
Diffstat (limited to 'libstdc++-v3/testsuite/util/testsuite_character.h')
-rw-r--r-- | libstdc++-v3/testsuite/util/testsuite_character.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libstdc++-v3/testsuite/util/testsuite_character.h b/libstdc++-v3/testsuite/util/testsuite_character.h index 35ccfa8..ceda1f5 100644 --- a/libstdc++-v3/testsuite/util/testsuite_character.h +++ b/libstdc++-v3/testsuite/util/testsuite_character.h @@ -294,7 +294,7 @@ namespace std const extern_type* end, size_t max) const { const extern_type* beg = from; - while (from < end && max) + while (from < end) { unsigned char c = *from; if (c & 0xc0) @@ -304,6 +304,8 @@ namespace std ++from; continue; } + + if (max == 0) break; unsigned char tmp; if (state.value & 0x8) |