Lunatic: fix hex literal parsing on Windows, add two comments.

git-svn-id: https://svn.eduke32.com/eduke32@2859 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-08-02 10:52:35 +00:00
parent a00f411b3b
commit 86a3603edd
3 changed files with 4 additions and 2 deletions

View file

@ -149,6 +149,8 @@ LUAJIT=luajit
LUAJIT_WIN_SRC:= g:/mod/LuaJIT-2.0.0-beta8/src LUAJIT_WIN_SRC:= g:/mod/LuaJIT-2.0.0-beta8/src
ifneq (0,$(LUNATIC)) ifneq (0,$(LUNATIC))
# TODO: pass these flags only when building EDuke32, not Mapster32
ifeq ($(PLATFORM),WINDOWS) ifeq ($(PLATFORM),WINDOWS)
OURCFLAGS+= -I$(LUAJIT_WIN_SRC) OURCFLAGS+= -I$(LUAJIT_WIN_SRC)
else else

View file

@ -720,7 +720,7 @@ G_.tonumber = tonumber
--rawget --rawget
G_.xpcall = xpcall G_.xpcall = xpcall
G_.ipairs = ipairs G_.ipairs = ipairs
G_.print = print G_.print = print -- TODO: --> initprintf or OSD_Printf; why not needed on linux?
G_.pcall = pcall G_.pcall = pcall
--gcinfo --DEPRECATED --gcinfo --DEPRECATED
--module --module

View file

@ -124,7 +124,7 @@ end
local function parse_number(pos, numstr) local function parse_number(pos, numstr)
local num = tonumber(numstr) local num = tonumber(numstr)
if (num < -0x80000000 or num > 0xffffffff) then if (num==nil or num < -0x80000000 or num > 0xffffffff) then
perrprintf(pos, "number %s out of the range of a 32-bit integer", numstr) perrprintf(pos, "number %s out of the range of a 32-bit integer", numstr)
num = NaN num = NaN
elseif (num >= 0x80000000 and numstr:sub(1,2):lower()~="0x") then elseif (num >= 0x80000000 and numstr:sub(1,2):lower()~="0x") then