From: Koji Arai Date: Fri, 22 Aug 2008 16:33:48 +0000 (+0900) Subject: seek_lha_header() should search the PMA archive X-Git-Url: http://git.osdn.net/view?p=lha%2Flha.git;a=commitdiff_plain;h=bb6dc75e2e7cbcd0f42380e8283cf47e24f43181 seek_lha_header() should search the PMA archive --- diff --git a/src/header.c b/src/header.c index 5b710b9..fc3a3b5 100644 --- a/src/header.c +++ b/src/header.c @@ -1245,9 +1245,11 @@ seek_lha_header(fp) n = fread(buffer, 1, sizeof(buffer), fp); for (p = buffer; p < buffer + n; p++) { - if (! (p[I_METHOD]=='-' && p[I_METHOD+1]=='l' && p[I_METHOD+4]=='-')) + if (! (p[I_METHOD]=='-' && + (p[I_METHOD+1]=='l' || p[I_METHOD+1]=='p') && + p[I_METHOD+4]=='-')) continue; - /* found "-l??-" keyword (as METHOD type string) */ + /* found "-[lp]??-" keyword (as METHOD type string) */ /* level 0 or 1 header */ if ((p[I_HEADER_LEVEL] == 0 || p[I_HEADER_LEVEL] == 1)