From e7d5da17cba3de976a87db6ca88ed8cf100c5810 Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Tue, 6 Oct 2020 15:56:26 +0200 Subject: [PATCH] main: use "C" locale for LC_NUMERIC Some locales use ',' as decimal separator instead of '.', which is taken into account by sscanf when parsing floating point values. This can lead to parsing failures for the `colormatrix` and `forwardmatrix` config options. Setting LC_NUMERIC to "C" solves this problem. --- main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.c b/main.c index cc3aed2..6459bc9 100644 --- a/main.c +++ b/main.c @@ -15,6 +15,7 @@ #include #include #include +#include #include "config.h" #include "ini.h" #include "quickdebayer.h" @@ -1466,6 +1467,8 @@ main(int argc, char *argv[]) return ret; } + setenv("LC_NUMERIC", "C", 1); + TIFFSetTagExtender(register_custom_tiff_tags); gtk_init(&argc, &argv);