lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Maybe Lua never has to convert such large numbers.
But to satisfy luaS_newlstr, better pass the correct type?

LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l);

diff --git a/lobject.c b/lobject.c
index f8ea917a..42144a1c 100644
--- a/lobject.c
+++ b/lobject.c
@@ -373,7 +373,7 @@ static int tostringbuff (TValue *obj, char *buff) {
 */
 void luaO_tostring (lua_State *L, TValue *obj) {
   char buff[MAXNUMBER2STR];
-  int len = tostringbuff(obj, buff);
+  size_t len = tostringbuff(obj, buff);
   setsvalue(L, obj, luaS_newlstr(L, buff, len));
 }