]> git.sur5r.net Git - cc65/commitdiff
Fixed an optimizer problem.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 21 Mar 2010 14:08:46 +0000 (14:08 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 21 Mar 2010 14:08:46 +0000 (14:08 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4632 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/codeopt.c

index aef56397318ded4d87654e317a10f984514436ca..81201423fbc03a22fe732577f6f2bfadbfc57c68 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2001-2009 Ullrich von Bassewitz                                       */
-/*               Roemerstrasse 52                                            */
-/*               D-70794 Filderstadt                                         */
-/* EMail:        uz@cc65.org                                                 */
+/* (C) 2001-2010, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -904,14 +904,14 @@ static unsigned OptPtrStore3 (CodeSeg* S)
                    X = NewCodeEntry (OP65_TAY, AM65_IMP, 0, 0, L[4]->LI);
            CS_InsertEntry (S, X, I+15);
 
-            X = NewCodeEntry (OP65_LDA, L[8]->AM, L[8]->Arg, 0, L[8]->LI);
+            X = NewCodeEntry (OP65_LDA, L[9]->AM, L[9]->Arg, 0, L[9]->LI);
             CS_InsertEntry (S, X, I+16);
 
            Label = memcpy (xmalloc (Len-2), L[0]->Arg+2, Len-3);
            Label[Len-3] = '\0';
                    X = NewCodeEntry (OP65_STA, AM65_ABSY, Label, 0, L[11]->LI);
            CS_InsertEntry (S, X, I+17);
-           xfree (Label);
+            xfree (Label);
 
            /* Remove the old code */
            CS_DelEntries (S, I, 12);