1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 00:29:31 +00:00

Fixed a bug

git-svn-id: svn://svn.cc65.org/cc65/trunk@1475 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2002-10-29 17:53:17 +00:00
parent 9f8887fe6b
commit 571ea849d9

View File

@ -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) &&