diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-09 05:50:42 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-09 05:50:42 +0800 |
commit | e28a0fc596acffdfc640501707ba71d3ccd2e17d (patch) | |
tree | afc6c2f805753bb53f1f6634c4e574d199405e51 /mbbsd/chess.c | |
parent | a8d6240a1db56b86073d284ee5abf433e8d283d5 (diff) | |
download | pttbbs-e28a0fc596acffdfc640501707ba71d3ccd2e17d.tar pttbbs-e28a0fc596acffdfc640501707ba71d3ccd2e17d.tar.gz pttbbs-e28a0fc596acffdfc640501707ba71d3ccd2e17d.tar.bz2 pttbbs-e28a0fc596acffdfc640501707ba71d3ccd2e17d.tar.lz pttbbs-e28a0fc596acffdfc640501707ba71d3ccd2e17d.tar.xz pttbbs-e28a0fc596acffdfc640501707ba71d3ccd2e17d.tar.zst pttbbs-e28a0fc596acffdfc640501707ba71d3ccd2e17d.zip |
Fix r3015.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3017 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/chess.c')
-rw-r--r-- | mbbsd/chess.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/mbbsd/chess.c b/mbbsd/chess.c index f866d4c4..04a05f03 100644 --- a/mbbsd/chess.c +++ b/mbbsd/chess.c @@ -885,8 +885,8 @@ ChessWatchGame(void (*play)(int, ChessGameMode), int game, const char* title) static void ChessInitUser(ChessInfo* info) { - char userid[2][IDLEN + 1]; - userec_t xuser; + char userid[2][IDLEN + 1]; + const userinfo_t* uinfo; if (info->mode == CHESS_MODE_PERSONAL) { strlcpy(userid[0], cuser.userid, sizeof(userid[0])); @@ -897,15 +897,16 @@ ChessInitUser(ChessInfo* info) strlcpy(userid[0], uinfo->userid, sizeof(userid[0])); strlcpy(userid[1], uinfo->mateid, sizeof(userid[1])); } - else { + else if (info->mode == CHESS_MODE_VERSUS) { strlcpy(userid[0], cuser.userid, sizeof(userid[0])); strlcpy(userid[1], currutmp->mateid, sizeof(userid[1])); - } + } else + assert_not_reached(); - getuser(userid[0], &xuser); - info->actions->init_user(&xuser, &info->user1); - getuser(userid[1], &xuser); - info->actions->init_user(&xuser, &info->user2); + uinfo = search_ulist_userid(userid[0]); + info->actions->init_user(uinfo, &info->user1); + uinfo = search_ulist_userid(userid[1]); + info->actions->init_user(uinfo, &info->user2); } static char* |