summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-15 00:04:29 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-15 00:04:29 +0800
commitcb8834089f70235c9732e538b4e686dc0c304025 (patch)
treeb08627c5f2868b505d7495e943fcc4eea67b759c
parent803a415be1d5b7bb52462ceb76da4bb2f72b8585 (diff)
downloadpttbbs-cb8834089f70235c9732e538b4e686dc0c304025.tar
pttbbs-cb8834089f70235c9732e538b4e686dc0c304025.tar.gz
pttbbs-cb8834089f70235c9732e538b4e686dc0c304025.tar.bz2
pttbbs-cb8834089f70235c9732e538b4e686dc0c304025.tar.lz
pttbbs-cb8834089f70235c9732e538b4e686dc0c304025.tar.xz
pttbbs-cb8834089f70235c9732e538b4e686dc0c304025.tar.zst
pttbbs-cb8834089f70235c9732e538b4e686dc0c304025.zip
fix post money
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@170 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/edit.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 9ad0566f..b062c4ec 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1,4 +1,4 @@
-/* $Id: edit.c,v 1.8 2002/05/13 03:20:04 ptt Exp $ */
+/* $Id: edit.c,v 1.9 2002/05/14 16:04:29 ptt Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -879,7 +879,6 @@ void addsignature(FILE *fp, int ifuseanony) {
static int
write_file(char *fpath, int saveheader, int *islocal) {
- time_t now;
struct tm *ptime;
FILE *fp = NULL;
textline_t *p, *v;
@@ -1555,7 +1554,7 @@ int vedit(char *fpath, int saveheader, int *islocal) {
int destuid0 = currutmp->destuid;
unsigned int money=0;
unsigned short int interval=0;
- time_t now=0,th;
+ time_t th;
textline_t* firstline0 = firstline;
textline_t* lastline0 = lastline;
@@ -1607,8 +1606,8 @@ int vedit(char *fpath, int saveheader, int *islocal) {
strcpy(line, currline->data);
ch = igetkey();
/* jochang debug */
- if((interval = (unsigned short int)((th = currutmp->lastact) - now))) {
- now = th;
+ if((interval = (unsigned short int)(now - th))) {
+ th=now;
if((char)ch != last) {
money++;
last = (char)ch;