diff options
author | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-11-08 17:52:45 +0800 |
---|---|---|
committer | victor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2006-11-08 17:52:45 +0800 |
commit | f9cf12182841e312e40b9cb3d63aa93bd26b8010 (patch) | |
tree | 16b6f59f8d9f4e1d86a2fe2f365d63d23820aa82 | |
parent | f15b36636dce8b18daca7bc874ff545116285807 (diff) | |
download | pttbbs-f9cf12182841e312e40b9cb3d63aa93bd26b8010.tar pttbbs-f9cf12182841e312e40b9cb3d63aa93bd26b8010.tar.gz pttbbs-f9cf12182841e312e40b9cb3d63aa93bd26b8010.tar.bz2 pttbbs-f9cf12182841e312e40b9cb3d63aa93bd26b8010.tar.lz pttbbs-f9cf12182841e312e40b9cb3d63aa93bd26b8010.tar.xz pttbbs-f9cf12182841e312e40b9cb3d63aa93bd26b8010.tar.zst pttbbs-f9cf12182841e312e40b9cb3d63aa93bd26b8010.zip |
fix last commit
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3445 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | mbbsd/fav.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mbbsd/fav.c b/mbbsd/fav.c index 8eb9f754..63e74527 100644 --- a/mbbsd/fav.c +++ b/mbbsd/fav.c @@ -964,8 +964,14 @@ static int add_and_remove_tag(fav_t *fp, fav_type_t *ft) } } tmp = fav_preappend(fav_get_tmp_fav(), ft->type); - strlcpy(cast_folder(tmp)->title, cast_folder(ft)->title, BTLEN + 1); - cast_folder(tmp)->this_folder = cast_folder(ft)->this_folder; + if (ft->type == FAVT_FOLDER) { + strlcpy(cast_folder(tmp)->title, cast_folder(ft)->title, BTLEN + 1); + cast_folder(tmp)->this_folder = cast_folder(ft)->this_folder; + } + else { + memcpy(tmp->fp, ft->fp, get_type_size(ft->type)); + } + free(ft->fp); ft->fp = NULL; |