]> www.dolda2000.com Git - ashd.git/commitdiff
patplex: Fixed segfault bug in pattern replacement.
authorFredrik Tolf <fredrik@dolda2000.com>
Mon, 10 Nov 2014 21:11:28 +0000 (22:11 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Mon, 10 Nov 2014 21:11:28 +0000 (22:11 +0100)
src/patplex.c

index d0e2dade2fff96eca07c407fc34c857e633af452..99395439123500ab914cf5cd385093c83b5a93a1 100644 (file)
@@ -383,12 +383,14 @@ static void qoffsets(char *buf, int *obuf, char *pstr, int unquote)
            o++;
        }
        buf[o] = 0;
+       obuf[o] = i;
     } else {
        for(i = 0; pstr[i]; i++) {
            buf[i] = pstr[i];
            obuf[i] = i;
        }
        buf[i] = 0;
+       obuf[i] = i;
     }
 }