*** pystrtod.c 2007-12-17 08:47:16.000000000 +0000 --- pystrtod.c.orig 2007-12-17 08:47:11.000000000 +0000 *************** *** 238,269 **** } } - /* Ensure that the exponent is at least 3 digits, - providing the buffer is large enough for the extra zeros. */ - if (format_char == 'e' || format_char == 'E' || - format_char == 'g' || format_char == 'G') { - p = buffer; - while (*p && *p != 'e' && *p != 'E') - ++p; - if (*p && (*(p + 1) == '-' || *(p + 1) == '+')) { - p += 2; - char *start = p; - int exponent_digit_count = 0; - while (*p && isdigit((unsigned char)*p)) { - ++p; - ++exponent_digit_count; - } - int zeros = 3 - exponent_digit_count; - if (exponent_digit_count && zeros > 0 && - start + zeros + exponent_digit_count + 1 - < buffer + buf_len) { - p = start; - memmove(p + zeros, p, exponent_digit_count + 1); - memset(p, '0', zeros); - } - } - } - return buffer; } --- 238,243 ----