From: cuz Date: Tue, 29 Oct 2002 17:53:17 +0000 (+0000) Subject: Fixed a bug X-Git-Tag: V2.12.0~2157 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=571ea849d97e9cd26a06b3101c894fb680aa02a7;p=cc65 Fixed a bug git-svn-id: svn://svn.cc65.org/cc65/trunk@1475 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- 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) &&