summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-06-27 18:36:37 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2014-06-27 18:36:37 +0800
commit2139ec3671694bbce021f702bb813f797b5088b3 (patch)
tree264cfa4dc7afcb090cb70cc2090d14f9d7da50f1
parent33be33bb5981a50e6101fb8855318dbf60f7086d (diff)
downloadpttbbs-2139ec3671694bbce021f702bb813f797b5088b3.tar
pttbbs-2139ec3671694bbce021f702bb813f797b5088b3.tar.gz
pttbbs-2139ec3671694bbce021f702bb813f797b5088b3.tar.bz2
pttbbs-2139ec3671694bbce021f702bb813f797b5088b3.tar.lz
pttbbs-2139ec3671694bbce021f702bb813f797b5088b3.tar.xz
pttbbs-2139ec3671694bbce021f702bb813f797b5088b3.tar.zst
pttbbs-2139ec3671694bbce021f702bb813f797b5088b3.zip
When limiting string size, we should do a.b instead of .b
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@6014 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--pttbbs/mbbsd/bbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c
index a0046a5f..d4f185e7 100644
--- a/pttbbs/mbbsd/bbs.c
+++ b/pttbbs/mbbsd/bbs.c
@@ -2668,7 +2668,7 @@ edit_title(int ent, fileheader_t * fhdr, const char *direct)
getdata_buf(b_lines - 1, 0, "§@ªÌ¡G", tmpfhdr.owner, IDLEN + 2, DOECHO);
getdata_str(b_lines - 1, 0, "¤é´Á¡G", datebuf, 6, DOECHO, tmpfhdr.date);
// Normalize date to %.5s
- snprintf(tmpfhdr.date, sizeof(tmpfhdr.date), "%.5s", datebuf);
+ snprintf(tmpfhdr.date, sizeof(tmpfhdr.date), "%5.5s", datebuf);
}
if (memcmp(&tmpfhdr, fhdr, sizeof(tmpfhdr)) == 0)
return FULLUPDATE;