PRINTFUNC(DLOG_DEBUG, "str = %s", str);
if (str != NULL) {
- char *tok;
- tok = strtok(str, ",");
+ char *tok, *ptr;
+ tok = strtok_r(str, ",", &ptr);
while (tok != NULL) {
PRINTFUNC(DLOG_DEBUG, "tok = %s", tok);
emoticon_list.push_back(strtol(tok, (char **)NULL, 10));
- tok = strtok(NULL, ",");
+ tok = strtok_r(NULL, ",", &ptr);
}
}