summaryrefslogtreecommitdiffstats
path: root/mbbsd/read.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-03 21:08:37 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-03 21:08:37 +0800
commit09ad37923288982a63098a7aa346ea79748f7eca (patch)
treead0b24b51e730c1173f6a258e3aa0957f045c055 /mbbsd/read.c
parentec3ed850be27c29ecc4d9fc2a0f0404f997fc7d6 (diff)
downloadpttbbs-09ad37923288982a63098a7aa346ea79748f7eca.tar
pttbbs-09ad37923288982a63098a7aa346ea79748f7eca.tar.gz
pttbbs-09ad37923288982a63098a7aa346ea79748f7eca.tar.bz2
pttbbs-09ad37923288982a63098a7aa346ea79748f7eca.tar.lz
pttbbs-09ad37923288982a63098a7aa346ea79748f7eca.tar.xz
pttbbs-09ad37923288982a63098a7aa346ea79748f7eca.tar.zst
pttbbs-09ad37923288982a63098a7aa346ea79748f7eca.zip
- fix a 7-year bug? force_open should really "force" open file.
- (internal) code refine - drop MAXPATHLEN and change few magic number (256) to PATHLEN. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4072 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/read.c')
-rw-r--r--mbbsd/read.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c
index e94e1191..c39a9381 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -482,9 +482,9 @@ select_read(const keeploc_t * locmem, int sr_mode)
#define READSIZE 64 // 8192 / sizeof(fileheader_t)
time4_t filetime;
fileheader_t fhs[READSIZE];
- char newdirect[MAXPATHLEN];
+ char newdirect[PATHLEN];
int first_select;
- char genbuf[MAXPATHLEN], *p = strstr(currdirect, "SR.");
+ char genbuf[PATHLEN], *p = strstr(currdirect, "SR.");
static int _mode = 0;
int reload, inc;
int len, fd, fr, i, count = 0, reference = 0;
@@ -568,7 +568,7 @@ select_read(const keeploc_t * locmem, int sr_mode)
snprintf(genbuf, sizeof(genbuf), "%s%X.%X.%X",
first_select ? "SR.":p,
sr_mode, (int)strlen(keyword), DBCS_StringHash(keyword));
- if( strlen(genbuf) > MAXPATHLEN - 50 )
+ if( strlen(genbuf) > PATHLEN - 50 )
return READ_REDRAW; // avoid overflow
if (currstat == RMAIL)