Use g_ascii_strtoll instead of strtol.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 5 Sep 2020 03:08:12 +0000 (05:08 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 5 Sep 2020 03:39:47 +0000 (05:39 +0200)
The former is locale sensitive.

src/ui/gui/psppire-scanf.c

index 986f48c79fad2e3392279e40be8bf1e309a2ae62..88128a3090a717f959502fcb1623ced90d39f974 100644 (file)
@@ -107,11 +107,11 @@ guts (PsppireScanf *scanf)
       int width = 0;
 
       if (dir.precision_start && dir.precision_end)
-       precision = strtol (dir.precision_start + 1,
+       precision = g_ascii_strtoll (dir.precision_start + 1,
                            (char **) &dir.precision_end, 10);
 
       if (dir.width_start && dir.width_end)
-       width = strtol (dir.width_start, (char **) &dir.width_end, 10);
+       width = g_ascii_strtoll (dir.width_start, (char **) &dir.width_end, 10);
 
       if (dir.dir_start > s)
        ship_label (scanf, &s, &scanf->d, i);