OSDN Git Service

* src/slide.c (interface;): Fixed wrong index.
authorarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Sun, 23 Jun 2002 09:29:48 +0000 (09:29 +0000)
committerarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Sun, 23 Jun 2002 09:29:48 +0000 (09:29 +0000)
  reported on LHa BBS (see <http://www2m.biglobe.ne.jp/~dolphin/>).

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/lha/lha/trunk@241 6a8cc165-1e22-0410-a132-eb4e3f353aba

src/slide.c

index a7d34fe..ebe77eb 100644 (file)
@@ -346,12 +346,12 @@ struct interfacing *interface;
                        addr += lastmatchlen +1 ;
 
                        {
-                         int t,cc;
-                       for (t=0; t<lastmatchlen+1; t++) {
-                         cc = text[(pos-(lastmatchoffset)) & (dicsiz-1)];
-                         fprintf(fout, "%02X ", cc);
-                       }
-                       fprintf(fout, "\n");
+                int t,cc;
+                for (t=0; t<lastmatchlen+1; t++) {
+                    cc = text[pos - lastmatchoffset - 2 + t];
+                    fprintf(fout, "%02X ", cc);
+                }
+                fprintf(fout, "\n");
                        }
 #endif
                        while (--lastmatchlen > 0) {