summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorvictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-02-24 17:55:24 +0800
committervictor <victor@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-02-24 17:55:24 +0800
commit94e8c909e652d348ef0dacb0ea4fca5b12e0e465 (patch)
tree635d205400bd8733f1decff55d43cd8d386122df /mbbsd
parent109250007e5b641ad8eb6079565bfeb24b7b339b (diff)
downloadpttbbs-94e8c909e652d348ef0dacb0ea4fca5b12e0e465.tar
pttbbs-94e8c909e652d348ef0dacb0ea4fca5b12e0e465.tar.gz
pttbbs-94e8c909e652d348ef0dacb0ea4fca5b12e0e465.tar.bz2
pttbbs-94e8c909e652d348ef0dacb0ea4fca5b12e0e465.tar.lz
pttbbs-94e8c909e652d348ef0dacb0ea4fca5b12e0e465.tar.xz
pttbbs-94e8c909e652d348ef0dacb0ea4fca5b12e0e465.tar.zst
pttbbs-94e8c909e652d348ef0dacb0ea4fca5b12e0e465.zip
i didn't do it
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1563 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/vote.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/vote.c b/mbbsd/vote.c
index 22a22f58..0f4a26e6 100644
--- a/mbbsd/vote.c
+++ b/mbbsd/vote.c
@@ -821,9 +821,9 @@ vote_flag(char *bname, int index, char val)
num = usernum - 1;
setbfile(buf, bname, STR_new_flags);
- if ((fd = open(buf, O_RDWR | O_CREAT | O_APPEND, 0600)) == -1)
+ if ((fd = open(buf, O_RDWR | O_CREAT, 0600)) == -1)
return -1;
- size = dashs(buf);
+ size = lseek(fd, 0, SEEK_END);
memset(buf, 0, sizeof(buf));
while (size <= num) {
write(fd, buf, sizeof(buf));