Avoid magic numbers for generating timeout code

This commit is contained in:
Robert Müller 2024-06-26 22:01:29 +02:00
parent 04b37f2db7
commit 872052b5b2

View file

@ -209,9 +209,9 @@ static void GenerateTimeoutCode(char *pTimeoutCode)
for(unsigned int i = 0; i < 16; i++)
{
if(rand() % 2)
pTimeoutCode[i] = (char)((rand() % 26) + 97);
pTimeoutCode[i] = (char)((rand() % ('z' - 'a' + 1)) + 'a');
else
pTimeoutCode[i] = (char)((rand() % 26) + 65);
pTimeoutCode[i] = (char)((rand() % ('Z' - 'A' + 1)) + 'A');
}
}
}