Fix crash, if -r used without arg or with one arg only

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@211 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
focus
2010-01-25 18:07:07 +00:00
parent 1c9851713a
commit dcf4783f22

View File

@@ -1897,10 +1897,11 @@ void CNeutrinoApp::CmdParser(int argc, char **argv)
zapit_debug = 1;
}
else if (!strcmp(argv[x], "-r")) {
x++;
if (x < argc)
xres = atoi(argv[++x]);
xres = atoi(argv[x++]);
if (x < argc)
yres = atoi(argv[++x]);
yres = atoi(argv[x++]);
}
else {
dprintf(DEBUG_NORMAL, "Usage: neutrino [-u | --enable-update] [-f | --enable-flash] "