From 571ea849d97e9cd26a06b3101c894fb680aa02a7 Mon Sep 17 00:00:00 2001 From: cuz Date: Tue, 29 Oct 2002 17:53:17 +0000 Subject: [PATCH] Fixed a bug git-svn-id: svn://svn.cc65.org/cc65/trunk@1475 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/coptsize.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cc65/coptsize.c b/src/cc65/coptsize.c index 3eaf48dce..b6b86e678 100644 --- a/src/cc65/coptsize.c +++ b/src/cc65/coptsize.c @@ -218,7 +218,9 @@ unsigned OptSize1 (CodeSeg* S) /* Check for any of the known functions. */ const CallDesc* D = FindCall (E->Arg); - while (D && strcmp (D->LongFunc, E->Arg) == 0) { + while (D && + D < CallTable + (sizeof (CallTable) / sizeof (CallTable[0])) && + strcmp (D->LongFunc, E->Arg) == 0) { /* Check the registers */ if ((D->A < 0 || D->A == E->RI->In.RegA) && (D->X < 0 || D->X == E->RI->In.RegX) && -- 2.39.5