diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-29 13:41:57 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-29 13:41:57 +0800 |
commit | abee8287194afc9a5c95b56c2ca21d5ebbab8cc2 (patch) | |
tree | 58b6d9fd6691ea9c4655ca631be496a3a5df4985 | |
parent | bcbe2aada6caf37efa117a457bc180cd2f0a5313 (diff) | |
download | pttbbs-abee8287194afc9a5c95b56c2ca21d5ebbab8cc2.tar pttbbs-abee8287194afc9a5c95b56c2ca21d5ebbab8cc2.tar.gz pttbbs-abee8287194afc9a5c95b56c2ca21d5ebbab8cc2.tar.bz2 pttbbs-abee8287194afc9a5c95b56c2ca21d5ebbab8cc2.tar.lz pttbbs-abee8287194afc9a5c95b56c2ca21d5ebbab8cc2.tar.xz pttbbs-abee8287194afc9a5c95b56c2ca21d5ebbab8cc2.tar.zst pttbbs-abee8287194afc9a5c95b56c2ca21d5ebbab8cc2.zip |
gomoku log read problem
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3113 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/gomo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/gomo.c b/mbbsd/gomo.c index d1487b4e..5603a4ec 100644 --- a/mbbsd/gomo.c +++ b/mbbsd/gomo.c @@ -529,7 +529,7 @@ gomoku_replay(FILE* fp) * 012345678901234567890123456789 */ gomo_step_t step = { CHESS_STEP_NORMAL, BLK }; int c = buf[11] - 'A'; - int r = BRDSIZ - 1 - (buf[12] - '0'); + int r = BRDSIZ - atoi(&buf[12]); #define INVALID_ROW(R) ((R) < 0 || (R) >= BRDSIZ) #define INVALID_COL(C) ((C) < 0 || (C) >= BRDSIZ) @@ -544,7 +544,7 @@ gomoku_replay(FILE* fp) continue; c = buf[28] - 'A'; - r = BRDSIZ - (buf[29] - '0'); + r = BRDSIZ - atoi(&buf[29]); if (INVALID_COL(c) || INVALID_ROW(r)) continue; |