From 840c6236d0533123632d5e322db4a61fe9438af1 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Sun, 16 Sep 2007 05:15:46 +0000 Subject: [PATCH] made the indirection vector generation dimension count check a little safer --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401439 --- sourcepawn/jit/x86/opcode_helpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sourcepawn/jit/x86/opcode_helpers.cpp b/sourcepawn/jit/x86/opcode_helpers.cpp index c9327611..55cbfe0a 100644 --- a/sourcepawn/jit/x86/opcode_helpers.cpp +++ b/sourcepawn/jit/x86/opcode_helpers.cpp @@ -501,7 +501,7 @@ cell_t _GenerateArrayIndirectionVectors(array_creation_t *ar, int dim, cell_t cu * Dimension n-x where x > 2 will have sub-vectors. * Otherwise, we just need to reference the data section. */ - if (dim < ar->dim_count - 2) + if (ar->dim_count > 2 && dim < ar->dim_count - 2) { /** * For each index at this dimension, write offstes to our sub-vectors.