summaryrefslogtreecommitdiffstats
path: root/mbbsd/aids.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-30 13:59:36 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-30 13:59:36 +0800
commitcd29a1da3cbeec80559309f8e16bba071137f2f8 (patch)
tree00f5c657e0d119515a5c46f0b56c4b169307d573 /mbbsd/aids.c
parent25ab88da2f3b6244c861c859999f658fc4c2990e (diff)
downloadpttbbs-cd29a1da3cbeec80559309f8e16bba071137f2f8.tar
pttbbs-cd29a1da3cbeec80559309f8e16bba071137f2f8.tar.gz
pttbbs-cd29a1da3cbeec80559309f8e16bba071137f2f8.tar.bz2
pttbbs-cd29a1da3cbeec80559309f8e16bba071137f2f8.tar.lz
pttbbs-cd29a1da3cbeec80559309f8e16bba071137f2f8.tar.xz
pttbbs-cd29a1da3cbeec80559309f8e16bba071137f2f8.tar.zst
pttbbs-cd29a1da3cbeec80559309f8e16bba071137f2f8.zip
- board: enable changing to MyFavorite in HotBoards
- bugfix: snprintf() on UNIX takes directly sizeof(buf) and always append NUL. Warning: Windows port will not output NUL if truncated. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3883 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/aids.c')
-rw-r--r--mbbsd/aids.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mbbsd/aids.c b/mbbsd/aids.c
index 53bca85b..2b5baac7 100644
--- a/mbbsd/aids.c
+++ b/mbbsd/aids.c
@@ -79,8 +79,7 @@ char *aidu2fn(char *fn, aidu_t aidu)
if(fn == NULL)
return NULL;
- snprintf(fn, FNLEN - 1, "%c.%d.A.%03X", ((type == 0) ? 'M' : 'G'), (unsigned int)v1, (unsigned int)v2);
- fn[FNLEN - 1] = '\0';
+ snprintf(fn, FNLEN, "%c.%d.A.%03X", ((type == 0) ? 'M' : 'G'), (unsigned int)v1, (unsigned int)v2);
return fn;
}