Project

General

Profile

Feature #2402 ยป 0092-Apply-patch-2-for-lua-5.5.1.patch

Marko Lindqvist, 10/23/2026 11:01 PM

View differences:

dependencies/lua-5.5/Version.txt
(http://www.lua.org/ftp/lua-5.5.1.tar.gz)
Upstream bug fixes from https://www.lua.org/bugs.html applied:
1
1, 2
Not entire lua distribution directory hierarchy is included here, and
some files needed for Freeciv usage have been added.
dependencies/lua-5.5/src/lvm.c
if (step < 0) return 1; /* initial value must be less than it */
*p = LUA_MAXINTEGER; /* truncate */
}
else { /* it is less than min integer */
else if (luai_numgt(0, flim)) { /* if it is negative, it is too small */
if (step > 0) return 1; /* initial value must be greater than it */
*p = LUA_MININTEGER; /* truncate */
}
else return 1; /* limit is NaN (neither 0 nor positive nor negative) */
}
return (step > 0 ? init > *p : init < *p); /* not to run? */
}
......
luaG_forerror(L, pinit, "initial value");
if (step == 0)
luaG_runerror(L, "'for' step is zero");
if (luai_numlt(0, step) ? luai_numlt(limit, init)
: luai_numlt(init, limit))
if (!(luai_numge(0, step) ? luai_numge(init, limit)
: luai_numge(limit, init)))
return 1; /* skip the loop */
else {
/* make sure all values are floats */
    (1-1/1)