From 54c4e94205224b26a8e299950606bd68d5bca91f Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Fri, 8 Jan 2021 05:30:29 +0000 Subject: [PATCH] Fix for libast sfstrtof() (Solaris patch 075-multi_lang_arith) 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. --- src/lib/libast/sfio/sfstrtof.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/libast/sfio/sfstrtof.h b/src/lib/libast/sfio/sfstrtof.h index 37b28ec32..4b2f40076 100644 --- a/src/lib/libast/sfio/sfstrtof.h +++ b/src/lib/libast/sfio/sfstrtof.h @@ -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)) {