diff options
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/vote.c | 4 |
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)); |