fix randstring bug

This commit is contained in:
charsyam 2012-11-20 02:50:31 +08:00
parent 49b6452351
commit 52b52a3508

View File

@ -1041,7 +1041,8 @@ void pop(unsigned char *zl, int where) {
} }
int randstring(char *target, unsigned int min, unsigned int max) { int randstring(char *target, unsigned int min, unsigned int max) {
int p, len = min+rand()%(max-min+1); int p = 0;
int len = min+rand()%(max-min+1);
int minval, maxval; int minval, maxval;
switch(rand() % 3) { switch(rand() % 3) {
case 0: case 0: