From 382dad70a1c48c2ada3a46ab3f523bcf6642a40f Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Fri, 26 Dec 2008 23:28:04 +0000 Subject: [PATCH] On a 64 bit machines, uint32_t is promoted to unsigned int when compared with 0 and cannot ever be negative. cast it to int32_t first to force sign extension when comparing with 0. --- stepmania/src/lua-5.1/src/lundump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stepmania/src/lua-5.1/src/lundump.c b/stepmania/src/lua-5.1/src/lundump.c index 3856a8577c..f1fe7e54c8 100644 --- a/stepmania/src/lua-5.1/src/lundump.c +++ b/stepmania/src/lua-5.1/src/lundump.c @@ -67,7 +67,7 @@ static int LoadInt(LoadState* S) LoadVar(S,x); if (S->flip) x = Swap32(x); - IF (x<0, "bad integer"); + IF ((int32_t)x<0, "bad integer"); return x; }