don't overflow int when parsing SAM version

This commit is contained in:
PobreGato
2026-09-26 01:24:43 -04:00
parent bdac44084f
commit 28c65b6d59
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -92,6 +92,7 @@ namespace client
{
if (ch >= '0' && ch <= '9')
{
if (version > MAX_SAM_VERSION_VALUE) continue; // don't overflow on a long number
version *= 10;
version += (ch - '0');
}