diff options
Diffstat (limited to 'silx/io/specfile/src/locale_management.c')
-rw-r--r-- | silx/io/specfile/src/locale_management.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/silx/io/specfile/src/locale_management.c b/silx/io/specfile/src/locale_management.c index 54695f5..0c5f7ca 100644 --- a/silx/io/specfile/src/locale_management.c +++ b/silx/io/specfile/src/locale_management.c @@ -39,6 +39,9 @@ # else # ifdef SPECFILE_POSIX # include <locale.h> +# ifndef LOCALE_NAME_MAX_LENGTH +# define LOCALE_NAME_MAX_LENGTH 85 +# endif # endif # endif #endif @@ -60,7 +63,7 @@ double PyMcaAtof(const char * inputString) #else #ifdef SPECFILE_POSIX char *currentLocaleBuffer; - char localeBuffer[21]; + char localeBuffer[LOCALE_NAME_MAX_LENGTH + 1] = {'\0'}; double result; currentLocaleBuffer = setlocale(LC_NUMERIC, NULL); strcpy(localeBuffer, currentLocaleBuffer); |