Permalink
Browse files

fix output error when using multiple loops at the same nest level

  • Loading branch information...
1 parent 4b19641 commit 68217e9265dcb7f39297b69ef68ae89f6f0de201 @qartis committed Feb 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 templat.c
View
@@ -209,7 +209,7 @@ char *templat_process_loops(struct templat_row_t *row, char *data)
printf("unterminated loop: %.20s\n", pos);
goto err;
}
- strncat(output, data + offset, pos - data);
+ strncat(output, data + offset, pos - data - offset);
loop = templat_get_loop(row, key);
if (loop) {
for (i = 0; i < loop->nrows; i++) {

0 comments on commit 68217e9

Please sign in to comment.