We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbe76fc commit e3fa32cCopy full SHA for e3fa32c
ext/bcmath/libbcmath/src/str2num.c
@@ -142,6 +142,13 @@ static bool bc_scientific_notation_str2num(
142
exponent_ptr++;
143
}
144
145
+ if (fractional_end != NULL) {
146
+ /* Skip fraction trailing zeros. This is rare, so don't do bulk processing. */
147
+ while (fractional_end[-1] == '0') {
148
+ fractional_end--;
149
+ }
150
151
+
152
const char *integer_end = integer_ptr + digits;
153
154
size_t str_scale = fractional_end - fractional_ptr;
0 commit comments