diff options
author | simonmar <unknown> | 2005-07-12 12:20:58 +0000 |
---|---|---|
committer | simonmar <unknown> | 2005-07-12 12:20:58 +0000 |
commit | f07870783a31b3545cb2906659d5cfea90d90f0e (patch) | |
tree | ef91c88e96bdde4eaf5373ab77f484799e15d6e1 | |
parent | b2c6611739821c725899d57c5a4dc90d5cbb0662 (diff) | |
download | haskell-f07870783a31b3545cb2906659d5cfea90d90f0e.tar.gz |
[project @ 2005-07-12 12:20:58 by simonmar]
More 64-fixing
-rw-r--r-- | ghc/rts/Interpreter.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ghc/rts/Interpreter.c b/ghc/rts/Interpreter.c index 45995520dc..004bb6f256 100644 --- a/ghc/rts/Interpreter.c +++ b/ghc/rts/Interpreter.c @@ -514,7 +514,7 @@ do_apply: case PAP: { StgPAP *pap; - nat arity, i; + nat i, arity; pap = (StgPAP *)obj; @@ -534,7 +534,8 @@ do_apply: // Shuffle the args for this function down, and put // the appropriate info table in the gap. for (i = 0; i < arity; i++) { - Sp[i-1] = Sp[i]; + Sp[(int)i-1] = Sp[i]; + // ^^^^^ careful, i-1 might be negative, but i in unsigned } Sp[arity-1] = app_ptrs_itbl[n-arity-1]; Sp--; @@ -577,8 +578,7 @@ do_apply: } case BCO: { - nat arity; - int i; // arithmetic involving i might go negative below + nat arity, i; Sp++; arity = ((StgBCO *)obj)->arity; @@ -591,7 +591,8 @@ do_apply: // Shuffle the args for this function down, and put // the appropriate info table in the gap. for (i = 0; i < arity; i++) { - Sp[i-1] = Sp[i]; + Sp[(int)i-1] = Sp[i]; + // ^^^^^ careful, i-1 might be negative, but i in unsigned } Sp[arity-1] = app_ptrs_itbl[n-arity-1]; Sp--; |