summaryrefslogtreecommitdiffstats
path: root/util/uhash_loader.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-31 09:17:30 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-03-31 09:17:30 +0800
commit2c775c59bd63b03eb301232e888163d041e15afe (patch)
tree200a9b11ed2dc36db6a1f55c279585b5e6286c14 /util/uhash_loader.c
parent747e273a246da13dbf14c22f49a0cb80ed8f4fbb (diff)
downloadpttbbs-2c775c59bd63b03eb301232e888163d041e15afe.tar
pttbbs-2c775c59bd63b03eb301232e888163d041e15afe.tar.gz
pttbbs-2c775c59bd63b03eb301232e888163d041e15afe.tar.bz2
pttbbs-2c775c59bd63b03eb301232e888163d041e15afe.tar.lz
pttbbs-2c775c59bd63b03eb301232e888163d041e15afe.tar.xz
pttbbs-2c775c59bd63b03eb301232e888163d041e15afe.tar.zst
pttbbs-2c775c59bd63b03eb301232e888163d041e15afe.zip
uhash_loader debug
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1644 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'util/uhash_loader.c')
-rw-r--r--util/uhash_loader.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/util/uhash_loader.c b/util/uhash_loader.c
index 6b1c68d0..a23ecf47 100644
--- a/util/uhash_loader.c
+++ b/util/uhash_loader.c
@@ -121,7 +121,10 @@ int loadmoney(userec_t *user)
{
int fd, money=0;
char path[256];
+
+ if(user->userid[0]==0) return 0;
sprintf(path,BBSHOME "/home/%c/%s/.passwd", user->userid[0], user->userid);
+
if((fd=open(path, O_RDONLY))<0)
return user->money;
if(lseek(fd, (off_t)((int)&(user->money) - (int)user), SEEK_SET) >= 0)