1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-02-21 20:27:13 +01:00

Don't guess the string size when that information is already available.

This commit is contained in:
Sandu Liviu Catalin 2018-10-26 18:54:04 +03:00
parent e6b80a40d2
commit 69bc0ba5c2

View File

@ -77,7 +77,7 @@ public:
string overloadName = SqOverloadName::Get(funcName, argCount);
sq_pushstring(vm, overloadName.c_str(), -1);
sq_pushstring(vm, overloadName.c_str(), static_cast<SQInteger>(overloadName.size()));
#if !defined (SCRAT_NO_ERROR_CHECKING)
if (SQ_FAILED(sq_get(vm, 1))) { // Lookup the proper overload