From 8443755772160e61679e3122190da18ba10d8878 Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Fri, 12 Nov 2021 12:44:09 -0600 Subject: Fix timer being locale dependent for decimals `/timer .1 echo hi` now works in all locales. --- src/common/plugin-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/plugin-timer.c') diff --git a/src/common/plugin-timer.c b/src/common/plugin-timer.c index d0c82c28..17f11ce3 100644 --- a/src/common/plugin-timer.c +++ b/src/common/plugin-timer.c @@ -198,7 +198,7 @@ timer_cb (char *word[], char *word_eol[], void *userdata) offset += 2; } - timeout = atof (word[2 + offset]); + timeout = g_ascii_strtod (word[2 + offset], NULL); command = word_eol[3 + offset]; if (timeout < 0.1 || timeout * 1000 > INT_MAX || !command[0]) -- cgit 1.4.1