From ed94a85f0c08b2c17e82f0012e503aac13afe9a7 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 25 May 2000 16:02:21 -0300 Subject: [PATCH] type details --- lvm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lvm.c b/lvm.c index 787130ff..da851516 100644 --- a/lvm.c +++ b/lvm.c @@ -1,5 +1,5 @@ /* -** $Id: lvm.c,v 1.107 2000/05/22 18:44:46 roberto Exp roberto $ +** $Id: lvm.c,v 1.108 2000/05/24 13:54:49 roberto Exp roberto $ ** Lua virtual machine ** See Copyright Notice in lua.h */ @@ -282,7 +282,8 @@ static void strconc (lua_State *L, int total, StkId top) { call_binTM(L, top, IM_CONCAT, "unexpected type for concatenation"); else if (tsvalue(top-1)->u.s.len > 0) { /* if len=0, do nothing */ /* at least two string values; get as many as possible */ - lint32 tl = tsvalue(top-1)->u.s.len + tsvalue(top-2)->u.s.len; + lint32 tl = (lint32)tsvalue(top-1)->u.s.len + + (lint32)tsvalue(top-2)->u.s.len; char *buffer; int i; while (n < total && !tostring(L, top-n-1)) { /* collect total length */ @@ -293,7 +294,7 @@ static void strconc (lua_State *L, int total, StkId top) { buffer = luaL_openspace(L, tl); tl = 0; for (i=n; i>0; i--) { /* concat all strings */ - lint32 l = tsvalue(top-i)->u.s.len; + size_t l = tsvalue(top-i)->u.s.len; memcpy(buffer+tl, tsvalue(top-i)->str, l); tl += l; }