lua

A copy of the Lua development repository
Log | Files | Refs | README

commit 8fac494509523dba479640a3e9b60c6f929b0788
parent 9b72355f993567facefec570fd95c8909de33393
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date:   Thu, 19 Sep 2024 19:09:08 -0300

Avoid Microsoft warning

> warning C4334: '<<': result of 32-bit shift implicitly converted to
> 64 bits (was 64-bit shift intended?)

Diffstat:
Mltable.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ltable.c b/ltable.c @@ -402,7 +402,8 @@ int luaH_next (lua_State *L, Table *t, StkId key) { static void freehash (lua_State *L, Table *t) { if (!isdummy(t)) { - size_t bsize = sizenode(t) * sizeof(Node); /* 'node' size in bytes */ + /* 'node' size in bytes */ + size_t bsize = cast_sizet(sizenode(t)) * sizeof(Node); char *arr = cast_charp(t->node); if (haslastfree(t)) { bsize += sizeof(Limbox);