Browse Source

Compile commander without C99

Thomas Buck 10 years ago
parent
commit
5d8add9c1e
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/deps/commander/commander.c

+ 2
- 1
src/deps/commander/commander.c View File

145
     if (len > 2 && '-' == arg[0] && !strchr(arg + 1, '-')) {
145
     if (len > 2 && '-' == arg[0] && !strchr(arg + 1, '-')) {
146
       alloc += len - 2;
146
       alloc += len - 2;
147
       nargv = realloc(nargv, alloc * sizeof(char *));
147
       nargv = realloc(nargv, alloc * sizeof(char *));
148
-      for (size_t j = 1; j < len; ++j) {
148
+      size_t j;
149
+      for (j = 1; j < len; ++j) {
149
         nargv[size] = malloc(3);
150
         nargv[size] = malloc(3);
150
         sprintf(nargv[size], "-%c", arg[j]);
151
         sprintf(nargv[size], "-%c", arg[j]);
151
         size++;
152
         size++;

Loading…
Cancel
Save