mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Avoid magic numbers for generating timeout code
This commit is contained in:
parent
04b37f2db7
commit
872052b5b2
|
@ -209,9 +209,9 @@ static void GenerateTimeoutCode(char *pTimeoutCode)
|
||||||
for(unsigned int i = 0; i < 16; i++)
|
for(unsigned int i = 0; i < 16; i++)
|
||||||
{
|
{
|
||||||
if(rand() % 2)
|
if(rand() % 2)
|
||||||
pTimeoutCode[i] = (char)((rand() % 26) + 97);
|
pTimeoutCode[i] = (char)((rand() % ('z' - 'a' + 1)) + 'a');
|
||||||
else
|
else
|
||||||
pTimeoutCode[i] = (char)((rand() % 26) + 65);
|
pTimeoutCode[i] = (char)((rand() % ('Z' - 'A' + 1)) + 'A');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue