summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2017-08-04 22:12:10 -0400
committerTavian Barnes <tavianator@tavianator.com>2017-08-10 22:33:06 -0400
commitc49dd050080562f829a053d3eb30597fb0c23339 (patch)
tree23d8ccb8d335b5dffa994fb1f1dc335088636415 /parse.c
parente8892ce0517958f313a3d9a8888850f98713c4a2 (diff)
downloadbfs-c49dd050080562f829a053d3eb30597fb0c23339.tar.xz
parse: Don't allow negative optimization levels
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index 7b10f39..2ba0602 100644
--- a/parse.c
+++ b/parse.c
@@ -760,7 +760,7 @@ static struct expr *parse_optlevel(struct parser_state *state, int arg1, int arg
if (strcmp(state->argv[0], "-Ofast") == 0) {
*optlevel = 4;
- } else if (!parse_int(state, state->argv[0] + 2, optlevel, IF_INT)) {
+ } else if (!parse_int(state, state->argv[0] + 2, optlevel, IF_INT | IF_UNSIGNED)) {
return NULL;
}