diff options
Diffstat (limited to 'build.c')
-rw-r--r-- | build.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -100,10 +100,13 @@ main(int argc, char *argv[]) /* Find target inside command. */ for(b = b+3; *b; b++){ - if(!(*b+1)) continue; - if(*b != '>') continue; - strncpy(tgt, b+1, MAXTGT-1); - + if(*(b+1) && *(b+2) && *(b+3) + && strncmp(b, "-o ", 3) == 0) + strncpy(tgt, b+3, + MAXTGT-1); + else if(*(b+1) && *b == '>') + strncpy(tgt, b+1, + MAXTGT-1); } ddd("%s: command line '%s'\n", |