Skip to content

Commit e25e886

Browse files
authored
[libc][z/OS] Remove ASCII trick to fix EBDIC std::from_char (#116078)
This PR will fix the following lit in all EBCDIC variations on z/OS: `std/utilities/charconv/charconv.from.chars/floating_point.pass.cpp` The trick to test for `e` and `E` is working only in ASCII. The fix is to simply test for both lower and upper case exponent letter `e` and `E` respectfully.
1 parent 62441b9 commit e25e886

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libc/src/__support/high_precision_decimal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,8 @@ class HighPrecisionDecimal {
350350
if (!saw_dot)
351351
this->decimal_point = total_digits;
352352

353-
if (num_cur < num_len && ((num_string[num_cur] | 32) == 'e')) {
353+
if (num_cur < num_len &&
354+
(num_string[num_cur] == 'e' || num_string[num_cur] == 'E')) {
354355
++num_cur;
355356
if (isdigit(num_string[num_cur]) || num_string[num_cur] == '+' ||
356357
num_string[num_cur] == '-') {

0 commit comments

Comments
 (0)