summaryrefslogtreecommitdiffstats
path: root/progs/demos
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2006-06-13 08:37:03 +0000
committerMichel Dänzer <[email protected]>2006-06-13 08:37:03 +0000
commit73e73ffdd5a3df45a61c3cd975b21c8cfc03f050 (patch)
tree7dbe6c06af3dd003a27c6a567fd20c00d4e8b5d3 /progs/demos
parentbd1e587ebe053b5a6d3b8cc3597b226d670f4667 (diff)
Fix command line parsing.
Diffstat (limited to 'progs/demos')
-rw-r--r--progs/demos/stex3d.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/progs/demos/stex3d.c b/progs/demos/stex3d.c
index e4554d071f3..83ae3684ae2 100644
--- a/progs/demos/stex3d.c
+++ b/progs/demos/stex3d.c
@@ -342,19 +342,19 @@ parseCmdLine(int argc, char **argv)
GLint i;
for (i = 1; i < argc; i++) {
- if (strstr(argv[i], "-w") == 0) {
+ if (strcmp(argv[i], "-help") == 0) {
+ printHelp();
+ return GL_FALSE;
+ }
+ else if (strstr(argv[i], "-w") != NULL) {
tex_width = atoi((argv[i]) + 2);
}
- else if (strstr(argv[i], "-h") == 0) {
+ else if (strstr(argv[i], "-h") != NULL) {
tex_height = atoi((argv[i]) + 2);
}
- else if (strstr(argv[i], "-d") == 0) {
+ else if (strstr(argv[i], "-d") != NULL) {
tex_depth = atoi((argv[i]) + 2);
}
- else if (strcmp(argv[i], "-help") == 0) {
- printHelp();
- return GL_FALSE;
- }
else {
printf("%s (Bad option).\n", argv[i]);
printHelp();