From 3f5117d020ce3ebc28adf43e5c2b3d50d33e5426 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Tue, 30 Mar 2010 12:45:46 +0100 Subject: [PATCH] check overflow correctly. --- C/globals.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C/globals.c b/C/globals.c index 240c9171d..61f3e62cf 100644 --- a/C/globals.c +++ b/C/globals.c @@ -233,7 +233,7 @@ Yap_GetFromArena(Term *arenap, UInt cells, UInt arity) H += cells; return base; } - if (base+cells > ASP-1024) { + if (base+cells > max-1024) { if (!GrowArena(arena, max, old_sz, old_sz+sizeof(CELL)*1024, arity)) return NULL; goto restart;