ziptool: fix unknown long options.

Previously an unknown long option would cause a crash as we ran off the
end of the array.

Test: `ziptool unzip --unknown`
Change-Id: I7a7b6ac4a0fa157c111f936e837c20143cef9e28
This commit is contained in:
Elliott Hughes 2019-11-16 11:18:50 -08:00
parent dc4bd2714c
commit 2ab5a70b9f

View file

@ -448,6 +448,7 @@ int main(int argc, char* argv[]) {
static const struct option opts[] = {
{"help", no_argument, 0, 'h'},
{},
};
if (role == kUnzip) {