summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/clock/clock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/clock/clock.c b/src/modules/clock/clock.c
index 0c5af00..d8c1472 100644
--- a/src/modules/clock/clock.c
+++ b/src/modules/clock/clock.c
@@ -585,10 +585,11 @@ void indicator_get_time_by_region(char* output,void *data)
}
char a_best_pattern[64] = {0,};
+ char *save_ptr;
i18n_ustring_copy_au(a_best_pattern, u_best_pattern);
- char *a_best_pattern_fixed = strtok(a_best_pattern, "a");
- a_best_pattern_fixed = strtok(a_best_pattern_fixed, " ");
+ char *a_best_pattern_fixed = strtok_r(a_best_pattern, "a", &save_ptr);
+ a_best_pattern_fixed = strtok_r(a_best_pattern_fixed, " ", &save_ptr);
if (a_best_pattern_fixed) {
i18n_ustring_copy_ua(u_best_pattern, a_best_pattern_fixed);
}