adjusts code sample for UcxMap

Sat, 12 May 2018 14:56:17 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 12 May 2018 14:56:17 +0200
changeset 299
e7dfcf229625
parent 298
fffe3a16a3de
child 301
0f83916c1639

adjusts code sample for UcxMap

docs/src/modules.md file | annotate | diff | comparison | revisions
--- a/docs/src/modules.md	Sat May 12 14:50:09 2018 +0200
+++ b/docs/src/modules.md	Sat May 12 14:56:17 2018 +0200
@@ -293,12 +293,12 @@
         char *arg = argv[i];
         size_t len = strlen(arg);
         if(len > 1 && arg[0] == '-') {
-            if(option) {
-                fprintf(stderr,
-                        "Missing argument for option -%c\n", optchar);
-                return 1;
-            }
             for(int c=1;c<len;c++) {
+                if(option) {
+                    fprintf(stderr,
+                            "Missing argument for option -%c\n", optchar);
+                    return 1;
+                }
                 switch(arg[c]) {
                     default: {
                         fprintf(stderr, "Unknown option -%c\n\n", arg[c]);

mercurial