summaryrefslogtreecommitdiff
path: root/progs/demos
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-06-18 12:43:43 -0600
committerBrian Paul <brianp@vmware.com>2009-06-26 13:16:32 -0600
commiteb1eee03a6796e0d7651ca77fea0ea705b41d70a (patch)
tree376249c2180bea273556ace43ebe5d4085f3a8d5 /progs/demos
parent4bc74a07561eeaa97dbde55c384998ea6aa5968c (diff)
demos: improve argv parsing in fslight.c
Diffstat (limited to 'progs/demos')
-rw-r--r--progs/demos/fslight.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/progs/demos/fslight.c b/progs/demos/fslight.c
index 41a13cc9f4..f0d76a4a06 100644
--- a/progs/demos/fslight.c
+++ b/progs/demos/fslight.c
@@ -583,10 +583,14 @@ ParseOptions(int argc, char *argv[])
int i;
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-fs") == 0) {
- FragProgFile = argv[i+1];
+ FragProgFile = argv[++i];
}
else if (strcmp(argv[i], "-vs") == 0) {
- VertProgFile = argv[i+1];
+ VertProgFile = argv[++i];
+ }
+ else {
+ fprintf(stderr, "unknown option %s\n", argv[i]);
+ break;
}
}
}