summaryrefslogtreecommitdiffstats
path: root/mbbsd/user.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-09-17 02:44:02 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2006-09-17 02:44:02 +0800
commit4429dbffee0301ff16cc3a59419c61c2995b7594 (patch)
tree9319409f6dff8aaeec115af1b41d76cbefea929e /mbbsd/user.c
parent5c194ee7761a78c7dd9789941ed631d1a2ec5113 (diff)
downloadpttbbs-4429dbffee0301ff16cc3a59419c61c2995b7594.tar
pttbbs-4429dbffee0301ff16cc3a59419c61c2995b7594.tar.gz
pttbbs-4429dbffee0301ff16cc3a59419c61c2995b7594.tar.bz2
pttbbs-4429dbffee0301ff16cc3a59419c61c2995b7594.tar.lz
pttbbs-4429dbffee0301ff16cc3a59419c61c2995b7594.tar.xz
pttbbs-4429dbffee0301ff16cc3a59419c61c2995b7594.tar.zst
pttbbs-4429dbffee0301ff16cc3a59419c61c2995b7594.zip
fix bug of regcode generation: rand() always has same sequence since no srand().
use random() instead of rand(). git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3416 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/user.c')
-rw-r--r--mbbsd/user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/user.c b/mbbsd/user.c
index 67ab556c..7b5fd4b8 100644
--- a/mbbsd/user.c
+++ b/mbbsd/user.c
@@ -504,7 +504,7 @@ makeregcode(char *buf)
buf[0] = 'v';
buf[1] = '6';
for( i = 2 ; i < 13 ; ++i )
- buf[i] = alphabet[rand() % 52];
+ buf[i] = alphabet[random() % 52];
getregfile(fpath);
if( (fd = open(fpath, O_WRONLY | O_CREAT, 0600)) == -1 ){