Fix command line parsing crash.
authorvogelheim@chromium.org <vogelheim@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 8 Aug 2014 14:42:18 +0000 (14:42 +0000)
committervogelheim@chromium.org <vogelheim@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 8 Aug 2014 14:42:18 +0000 (14:42 +0000)
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23005 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/flags.cc

index 8ddd836..98f21ef 100644 (file)
@@ -372,7 +372,8 @@ int FlagList::SetFlagsFromCommandLine(int* argc,
           value == NULL) {
         if (i < *argc) {
           value = argv[i++];
-        } else {
+        }
+        if (!value) {
           PrintF(stderr, "Error: missing value for flag %s of type %s\n"
                  "Try --help for options\n",
                  arg, Type2String(flag->type()));