summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
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;) {