From 67a628c97d416b52ad1914b43c4aa2480a6d9336 Mon Sep 17 00:00:00 2001 From: "n1214.hwang" Date: Thu, 6 Dec 2018 13:57:20 +0900 Subject: [PATCH] Update the way handling lc_numeric - https://review.tizen.org/gerrit/#/c/platform/upstream/efl/+/194095/ - setlocale(LC_NUMERIC, NULL) returns char* and this value will be changed again when setlocale called - So, update the lc_numeric value at specific timing, it should copid as string. Change-Id: I7fe5a222634641825e638670220defa86cb41c72 --- src/lib/ecore_wl2/ecore_wl2_input.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c index 39f16e9..0c59291 100644 --- a/src/lib/ecore_wl2/ecore_wl2_input.c +++ b/src/lib/ecore_wl2/ecore_wl2_input.c @@ -178,9 +178,14 @@ _ecore_wl2_input_key_conversion_set(Ecore_Wl2_Input *input) else { char* lc_numeric = setlocale(LC_NUMERIC, NULL); + char* old_numeric = lc_numeric? strdup(lc_numeric) : NULL; setlocale(LC_NUMERIC, "C"); _tizen_api_version = atof(temp); - setlocale(LC_NUMERIC, lc_numeric); + if(old_numeric) + { + setlocale(LC_NUMERIC, old_numeric); + free(old_numeric); + } INF("TIZEN_API_VERSION: %lf, Environment variable: %s\n", _tizen_api_version, temp); if (_tizen_api_version < 2.4) { -- 2.7.4