Skip to content

Commit

Permalink
Fix problem parsing large floating-point numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
GrieferAtWork committed Mar 10, 2024
1 parent 189cb18 commit 0dbafb5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/deemon/objects/float-parse.c.inl
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ DECL_BEGIN
PUBLIC NONNULL((1)) LOCAL_float_t DCALL
LOCAL_Dee_Strtod(char const *str, char **p_endptr) {
char sign, ch = *str;
LOCAL_float_t fltval = 0.0;
int numsys, more, float_extension_mult;
LOCAL_float_t float_extension_mult, fltval = 0.0;
int numsys, more;
sign = ch;
if (ch == '+' || ch == '-')
ch = *++str;
Expand Down Expand Up @@ -175,9 +175,9 @@ flt_ext:
ch = *str++;
}
--str; /* Point *at* the first character after the digit-sequence */
float_extension_mult = 1;
float_extension_mult = 1.0;
while (float_extension_off != 0) {
float_extension_mult *= 10;
float_extension_mult *= 10.0;
--float_extension_off;
}
if (float_extension_pos) {
Expand Down
2 changes: 1 addition & 1 deletion src/libjson
Submodule libjson updated 1 files
+1 −1 parser.c
2 changes: 1 addition & 1 deletion src/tpp
Submodule tpp updated 1 files
+4 −4 src/tpp.c

0 comments on commit 0dbafb5

Please sign in to comment.