OSDN Git Service

* src/lhext.c (cmd_extract): ftell(stdin) will return -1, so
authorarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Sat, 22 Jun 2002 17:45:12 +0000 (17:45 +0000)
committerarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Sat, 22 Jun 2002 17:45:12 +0000 (17:45 +0000)
re-fixed provisionaly.

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

src/lhext.c

index 2fdc2ed..254646d 100644 (file)
@@ -440,9 +440,10 @@ cmd_extract()
                        if (afp != stdin)
                 fseek(afp, pos + hdr.packed_size, SEEK_SET);
             else {
-                long pos2 = ftell(afp);
-                int i = pos + hdr.packed_size - pos2;
-                               while (i-- > 0) fgetc(afp);
+                /* FIXME: assume that the extract_one() has read
+                   packed_size bytes from stdin. */
+                long i = 0;
+                               while (i--) fgetc(afp);
             }
                } else {
                        if (afp != stdin)