From 8a086fa820d4eab829efb966ce9ee966a6a8d4c9 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 23 May 2007 03:21:40 +0000 Subject: [PATCH] fixed bug amb331 (compiler freeze on certain arrays) --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40848 --- sourcepawn/compiler/sc1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index 679012fd..5147a147 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -2449,8 +2449,7 @@ static cell calc_arraysize(int dim[],int numdim,int cur) return 0; subsize=calc_arraysize(dim,numdim,cur+1); newsize=dim[cur]+dim[cur]*subsize; - if ((ucell)subsize>=CELL_MAX || newsize>=CELL_MAX || newsize<(ucell)subsize - || newsize*sizeof(cell)>=CELL_MAX) + if ((ucell)subsize>=CELL_MAX || newsize>=CELL_MAX || newsize*sizeof(cell)>=CELL_MAX) return CELL_MAX; return newsize; }