From 0f5a226e2fb6cc73d8422e3de06101465cd81da7 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 14 Dec 2020 23:09:01 +0100 Subject: [PATCH] math: Use fish_wcstod instead 1. This should be using our wcstod_l on platforms where we need it (for some reason it wasn't picking it up on FreeBSD?) 2. This purports to have a "fast path". I like fast paths. --- src/tinyexpr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tinyexpr.cpp b/src/tinyexpr.cpp index 8413d8530..4de6453f2 100644 --- a/src/tinyexpr.cpp +++ b/src/tinyexpr.cpp @@ -251,7 +251,7 @@ static void next_token(state *s) { /* Try reading a number. */ if ((s->next[0] >= '0' && s->next[0] <= '9') || s->next[0] == '.') { - s->value = wcstod_l(s->next, const_cast(&s->next), fish_c_locale()); + s->value = fish_wcstod(s->next, const_cast(&s->next)); s->type = TOK_NUMBER; } else { /* Look for a function call. */