From 2492d4793bca488ce7d76ff6c39b22f32c2bf7c8 Mon Sep 17 00:00:00 2001 From: Daniel_Cortez Date: Thu, 26 Oct 2017 02:29:27 +0700 Subject: [PATCH] emit/__emit: Set the sign bit properly on non-32-bit cells --- source/compiler/sc1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index a6d1f2f..b384297 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -5893,7 +5893,7 @@ static void emit_param_num(char *name, ucell *p, int size) p[curp]=-val; break; } else if (tok==tRATIONAL) { - p[curp]=val|0x80000000; + p[curp]=val|((cell)1 << (PAWN_CELL_SIZE-1)); break; } else { strcpy(ival+1,str);