diff options
Diffstat (limited to 'mbbsd/chess.c')
-rw-r--r-- | mbbsd/chess.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mbbsd/chess.c b/mbbsd/chess.c index ebe25e16..e9eca609 100644 --- a/mbbsd/chess.c +++ b/mbbsd/chess.c @@ -1151,8 +1151,13 @@ ChessInitUser(ChessInfo* info) case CHESS_MODE_WATCH: uinfo = search_ulist_userid(currutmp->mateid); - strlcpy(userid[0], uinfo->userid, sizeof(userid[0])); - strlcpy(userid[1], uinfo->mateid, sizeof(userid[1])); + if (uinfo) { + strlcpy(userid[0], uinfo->userid, sizeof(userid[0])); + strlcpy(userid[1], uinfo->mateid, sizeof(userid[1])); + } else { + strlcpy(userid[0], currutmp->userid, sizeof(userid[0])); + userid[1][0] = 0; + } break; case CHESS_MODE_VERSUS: |