Skip to content

Commit d8980be

Browse files
author
Daniel Shelepanov
committed
review fixes
1 parent 158bc71 commit d8980be

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/show.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ typedef enum {
7878
} output_numeric_locale;
7979

8080
static void set_output_numeric_locale(output_numeric_locale loc) {
81-
const char *l = loc == LOCALE_PROBACKUP ? "C" : (const char*)getenv("LC_NUMERIC");
81+
const char *l = loc == LOCALE_PROBACKUP ? "C" :
82+
getenv("LC_NUMERIC") != NULL ? (const char *)getenv("LC_NUMERIC") : "C";
8283
// Setting environment-specified locale
8384
#ifdef HAVE_USELOCALE
8485
uselocale(newlocale(LC_NUMERIC_MASK, l, (locale_t) 0));

0 commit comments

Comments
 (0)