diff options
author | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-06-11 00:13:55 +0800 |
---|---|---|
committer | kcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-06-11 00:13:55 +0800 |
commit | b1742a061cfe32ebd4619a8f8a91812eaaf58bc0 (patch) | |
tree | 36eeea23af844489ae86dd9e07de3cb4f832d902 /mbbsd | |
parent | 506e0778f12136ab0204ab39521dc338c5362f4a (diff) | |
download | pttbbs-b1742a061cfe32ebd4619a8f8a91812eaaf58bc0.tar pttbbs-b1742a061cfe32ebd4619a8f8a91812eaaf58bc0.tar.gz pttbbs-b1742a061cfe32ebd4619a8f8a91812eaaf58bc0.tar.bz2 pttbbs-b1742a061cfe32ebd4619a8f8a91812eaaf58bc0.tar.lz pttbbs-b1742a061cfe32ebd4619a8f8a91812eaaf58bc0.tar.xz pttbbs-b1742a061cfe32ebd4619a8f8a91812eaaf58bc0.tar.zst pttbbs-b1742a061cfe32ebd4619a8f8a91812eaaf58bc0.zip |
ignore fav if load failed.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3541 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/fav.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mbbsd/fav.c b/mbbsd/fav.c index 89559c3b..f7ef9fac 100644 --- a/mbbsd/fav.c +++ b/mbbsd/fav.c @@ -558,13 +558,13 @@ int fav_load(void) fav_number = 0; fread(&version, sizeof(version), 1, frp); // if (version != FAV_VERSION) { ... } - if(read_favrec(frp, fp)==0) - fav_stack_push_fav(fp); - else { + if(read_favrec(frp, fp)<0) { // load fail fav_free_branch(fp); fav_number = 0; + fp = (fav_t *)fav_malloc(sizeof(fav_t)); } + fav_stack_push_fav(fp); fclose(frp); dirty = 0; return 0; |