1
0
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:
Sandu Liviu Catalin 2016-04-03 21:27:57 +03:00
parent ef27cf3c5f
commit 159e2f5929

View File

@ -192,7 +192,7 @@ bool SToB(CSStr str)
// The currently processed character
unsigned i = 0;
// 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++)));
}