summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-23 23:36:32 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-23 23:36:32 +0800
commite0cf6694429fc9e8e5c2be68569d441da8df49c7 (patch)
tree6fe38bea06701fc364fa834b766230a2aec6530d /mbbsd
parentd7a43da3380ed5d8830948f974a1f60aed4ae062 (diff)
downloadpttbbs-e0cf6694429fc9e8e5c2be68569d441da8df49c7.tar
pttbbs-e0cf6694429fc9e8e5c2be68569d441da8df49c7.tar.gz
pttbbs-e0cf6694429fc9e8e5c2be68569d441da8df49c7.tar.bz2
pttbbs-e0cf6694429fc9e8e5c2be68569d441da8df49c7.tar.lz
pttbbs-e0cf6694429fc9e8e5c2be68569d441da8df49c7.tar.xz
pttbbs-e0cf6694429fc9e8e5c2be68569d441da8df49c7.tar.zst
pttbbs-e0cf6694429fc9e8e5c2be68569d441da8df49c7.zip
- Tagging: offset-by-one error on alerting user
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3857 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/announce.c2
-rw-r--r--mbbsd/read.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/announce.c b/mbbsd/announce.c
index 7a10ef8c..831444f6 100644
--- a/mbbsd/announce.c
+++ b/mbbsd/announce.c
@@ -645,7 +645,7 @@ a_pastetagpost(menu_t * pm, int mode)
tagnum = TagNum;
// prevent if anything wrong
- if (tagnum >= MAXTAGS || tagnum < 0)
+ if (tagnum > MAXTAGS || tagnum < 0)
{
vmsg("內部錯誤。請把你剛剛進行的完整步驟貼到 "
GLOBAL_BUGREPORT " 板。");
diff --git a/mbbsd/read.c b/mbbsd/read.c
index 1feb8fc4..db503a0f 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -35,7 +35,7 @@ Tagger(time4_t chrono, int recno, int mode)
int head, tail, posi = 0, comp;
if(TagList == NULL) {
- TagList = malloc(sizeof(TagItem)*MAXTAGS);
+ TagList = malloc(sizeof(TagItem)*(MAXTAGS+1));
}
for (head = 0, tail = TagNum - 1, comp = 1; head <= tail;) {