fix tar compatibility code in lar. If you just say

"lar -b foo" lar crashes without this. Thanks to Patrick Mauritz for
finding this. (trivial patch)

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/repository/LinuxBIOSv3@363 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Stefan Reinauer 2007-06-20 07:44:52 +00:00
commit 6965c8d80b

View file

@ -126,7 +126,7 @@ int main(int argc, char *argv[])
// Right now, you'd have to write lar x -v instead of
// lar xv... but the author of this software was too
// lazy to handle all option parameter twice.
if (larmode == NONE) {
if (larmode == NONE && optind < argc) {
if (strncmp(argv[optind], "x", 2) == 0)
larmode = EXTRACT;
else if (strncmp(argv[optind], "c", 2) == 0)