summaryrefslogtreecommitdiffstats
path: root/mbbsd/chc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/chc.c')
-rw-r--r--mbbsd/chc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mbbsd/chc.c b/mbbsd/chc.c
index a4d3eeeb..82087703 100644
--- a/mbbsd/chc.c
+++ b/mbbsd/chc.c
@@ -949,11 +949,12 @@ chc_replay(FILE* fp)
/* /\[(Red|Black) "([a-zA-Z0-9]+)"\]/; $2 */
userec_t rec;
char *userid;
+ char *strtok_pos;
ChessUser *user =
(buf[1] == 'R' ? &info->user1 : &info->user2);
- strtok(buf, "\"");
- userid = strtok(NULL, "\"");
+ strtok_r(buf, "\"", &strtok_pos);
+ userid = strtok_r(NULL, "\"", &strtok_pos);
if (userid != NULL && getuser(userid, &rec))
chc_init_user_userec(&rec, user);
}