From 1dc2662a62892a3bf8be3ba2fa6b7ca641ac08e3 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 7 Nov 2006 11:50:30 +0000 Subject: [PATCH] fixed constant dimension size bug --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40158 --- sourcepawn/compiler/sc1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index 607e7083..d6101068 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -2027,7 +2027,7 @@ static int declloc(int fstatic) if (all_constant) { /* Change the last dimension to be based on chars instead if we have a string */ if (tag == pc_tag_string && dim[numdim-1]) - dim[numdim-1] = (size + sizeof(cell)-1) / sizeof(cell); + dim[numdim-1] = (dim[numdim-1] + sizeof(cell)-1) / sizeof(cell); /* Scrap the code generated */ ident = iARRAY; stgdel(_index, _code);