mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Fix a posible buffer overflow from the previous commit.
This commit is contained in:
parent
ef27cf3c5f
commit
159e2f5929
@ -192,7 +192,7 @@ bool SToB(CSStr str)
|
|||||||
// The currently processed character
|
// The currently processed character
|
||||||
unsigned i = 0;
|
unsigned i = 0;
|
||||||
// Convert only the necessary characters to lowercase
|
// Convert only the necessary characters to lowercase
|
||||||
while (i < 8 && *str != '\0')
|
while (i < 7 && *str != '\0')
|
||||||
{
|
{
|
||||||
buffer[i++] = static_cast< SQChar >(std::tolower(*(str++)));
|
buffer[i++] = static_cast< SQChar >(std::tolower(*(str++)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user