diff options
Diffstat (limited to 'client/mysqlmanager-pwgen.c')
-rw-r--r-- | client/mysqlmanager-pwgen.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/client/mysqlmanager-pwgen.c b/client/mysqlmanager-pwgen.c index eca9bfa23ea..f0fc5871ca1 100644 --- a/client/mysqlmanager-pwgen.c +++ b/client/mysqlmanager-pwgen.c @@ -112,14 +112,18 @@ void get_pass(char* pw, int len) fclose(fp); while (pw<pw_end) { - *pw++='a'+((uint)*pw % 26); + char tmp= 'a'+((uint)*pw % 26); + *pw++= tmp; } } else { srand(time(NULL)); while (pw<pw_end) - *pw++='a'+((uint)rand() % 26); + { + char tmp= 'a'+((uint)*pw % 26); + *pw++= tmp; + } } *pw_end=0; } |