diff options
author | Ben Smith <binjimin@gmail.com> | 2017-01-30 10:31:43 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-30 10:31:43 -0800 |
commit | edb3a471bc249855d5ece45dc21ee69af700b19b (patch) | |
tree | 65f01b87003516aee6bff293aa6e092cea19c2c7 /src/option-parser.c | |
parent | 7965a952da0a54063df3b9a96c5a2fb293aa50ad (diff) | |
download | wabt-edb3a471bc249855d5ece45dc21ee69af700b19b.tar.gz wabt-edb3a471bc249855d5ece45dc21ee69af700b19b.tar.bz2 wabt-edb3a471bc249855d5ece45dc21ee69af700b19b.zip |
Remove assert_{invalid,malformed} checks from wast2wast (#296)
Now that assert_invalid is checked by wasm-interp, all spec assertions
can be handled by the interpreter. Having a subset that are also handled
by wast2wasm is not useful.
Also, there was a bug in the option parser where passing an option that
didn't match could still work if a prefix was valid.
Diffstat (limited to 'src/option-parser.c')
-rw-r--r-- | src/option-parser.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/option-parser.c b/src/option-parser.c index 616c0462..fc680910 100644 --- a/src/option-parser.c +++ b/src/option-parser.c @@ -43,8 +43,10 @@ static int option_match(const char* s, return -1; break; } - if (s[i] != full[i]) + if (s[i] == '\0') break; + if (s[i] != full[i]) + return -1; } return i; } |