]> git.sur5r.net Git - cc65/commitdiff
Fixed another bug with help of Greg King
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 7 Dec 2005 17:47:46 +0000 (17:47 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Wed, 7 Dec 2005 17:47:46 +0000 (17:47 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3681 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/coptadd.c

index c27197ad27e8bb570058aca2990eb817de4054c4..e589e02abf4e82a649027ee8779e2bc90a44cba1 100644 (file)
@@ -309,14 +309,14 @@ unsigned OptAdd3 (CodeSeg* S)
     unsigned I = 0;
     while (I < CS_GetEntryCount (S)) {
 
-       CodeEntry* L[4];
+       CodeEntry* L[5];
 
        /* Get next entry */
                L[0] = CS_GetEntry (S, I);
 
        /* Check for the sequence */
         if (CE_IsCallTo (L[0], "pushax")                        &&
-                   CS_GetEntries (S, L+1, I+1, 3)                      &&
+                   CS_GetEntries (S, L+1, I+1, 5)                      &&
             !CS_RangeHasLabel (S, I+1, 3)                       &&
             L[1]->OPC == OP65_LDX                               &&
             CE_IsKnownImm (L[1], 0)                             &&