diff options
author | Brian Paul <brianp@vmware.com> | 2009-06-18 12:43:43 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-06-18 12:43:43 -0600 |
commit | 228cd062b3e82031aaf3a09cae579e4d92f85e96 (patch) | |
tree | 3840fcd578d65ee2ea58497a4ee61747fffd1521 | |
parent | 82eb74d76e7cf66d004e81abe6345803b21685c6 (diff) |
demos: improve argv parsing in fslight.c
-rw-r--r-- | progs/demos/fslight.c | 8 |
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; } } } |