diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-30 11:29:51 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-08-30 11:29:51 +0800 |
commit | a2b9b23ba507724920376cd13a0839abcfc1ac61 (patch) | |
tree | c343ddaff3c1e9019367ab6eec6deb9608df3e4e /mbbsd | |
parent | ba8c5e618e1b2cee24554abf3d51118019aa4c0e (diff) | |
download | pttbbs-a2b9b23ba507724920376cd13a0839abcfc1ac61.tar pttbbs-a2b9b23ba507724920376cd13a0839abcfc1ac61.tar.gz pttbbs-a2b9b23ba507724920376cd13a0839abcfc1ac61.tar.bz2 pttbbs-a2b9b23ba507724920376cd13a0839abcfc1ac61.tar.lz pttbbs-a2b9b23ba507724920376cd13a0839abcfc1ac61.tar.xz pttbbs-a2b9b23ba507724920376cd13a0839abcfc1ac61.tar.zst pttbbs-a2b9b23ba507724920376cd13a0839abcfc1ac61.zip |
warn user if file is unable to open.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3117 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/chess.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mbbsd/chess.c b/mbbsd/chess.c index e9eca609..7a350aab 100644 --- a/mbbsd/chess.c +++ b/mbbsd/chess.c @@ -1105,6 +1105,11 @@ ChessReplayGame(const char* fname) char buf[256]; screen_backup_t oldscreen; + if(fp == NULL) { + vmsg("檔案無法開啟, 可能被刪除了"); + return -1; + } + while (found == -1 && fgets(buf, sizeof(buf), fp)) { if (buf[0] == '<') { const int line_len = strlen(buf); |