From 69bc0ba5c244ef32c75bc914a8d7a8e820ad7a21 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Fri, 26 Oct 2018 18:54:04 +0300 Subject: [PATCH] Don't guess the string size when that information is already available. --- include/sqrat/sqratOverloadMethods.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sqrat/sqratOverloadMethods.h b/include/sqrat/sqratOverloadMethods.h index 9058c844..54266010 100644 --- a/include/sqrat/sqratOverloadMethods.h +++ b/include/sqrat/sqratOverloadMethods.h @@ -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(overloadName.size())); #if !defined (SCRAT_NO_ERROR_CHECKING) if (SQ_FAILED(sq_get(vm, 1))) { // Lookup the proper overload