Skip to content

Commit

Permalink
Fix for libast sfstrtof() (Solaris patch 075-multi_lang_arith)
Browse files Browse the repository at this point in the history
This change is pulled from here:
https://github.com/oracle/solaris-userland/blob/master/components/ksh93/patches/075-multi_lang_arith.patch

It appears to be a fix for converting a string to a floating point
value in certain locales. Unfortunately there is no publicly
available documentation on what it does exactly. We just have to
assume the Solaris people knew what they were doing.
  • Loading branch information
McDutchie committed Jan 8, 2021
1 parent c69bf54 commit 54c4e94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/libast/sfio/sfstrtof.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ S2F_function(str, end) char* str; char** end;
m = 0;
fraction = digits;
}
else if (c != thousand)
else if (c != thousand || (c == thousand && decimal == -1))
break;
else if (!(m = digits))
{
Expand Down

0 comments on commit 54c4e94

Please sign in to comment.