From: arai Date: Sat, 22 Jun 2002 17:45:12 +0000 (+0000) Subject: * src/lhext.c (cmd_extract): ftell(stdin) will return -1, so X-Git-Url: http://git.osdn.net/view?p=lha%2Flha.git;a=commitdiff_plain;h=3f4925c7c4523b6d9c4de7a84f6b1d1a36250d9b * src/lhext.c (cmd_extract): ftell(stdin) will return -1, so re-fixed provisionaly. git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/lha/lha/trunk@232 6a8cc165-1e22-0410-a132-eb4e3f353aba --- diff --git a/src/lhext.c b/src/lhext.c index 2fdc2ed..254646d 100644 --- a/src/lhext.c +++ b/src/lhext.c @@ -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)