Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Unified Diff: runtime/bin/main.cc

Issue 15724022: Require exact match of vm arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/main.cc
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index d2bcdba02266c10402d97703a03362785fe4daf4..54f26b2984a2e3403d1c57595073c3cc22daac77 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -262,7 +262,7 @@ static bool ProcessMainOptions(const char* option) {
int option_length = strlen(option);
while (name != NULL) {
int length = strlen(name);
- if ((option_length >= length) && (strncmp(option, name, length) == 0)) {
+ if (option_length == length && strncmp(option, name, length) == 0) {
Ivan Posva 2013/06/11 09:55:49 Please keep the parens. How will this match "--sn
Anders Johnsen 2013/06/11 10:44:32 Done. I see, updated.
if (!main_options[i].process(option + length)) {
Log::PrintErr("Invalid option specification : '%s'\n", option);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698