From ad1b72ed94a5d8ed9d5663bd884a7dc5cf69c0c9 Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Mon, 22 Feb 2010 19:27:05 +0100 Subject: [PATCH] Fix wrong output when nesting $combine-s --- src/combine.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/combine.cc b/src/combine.cc index aac4cf15..65189f41 100644 --- a/src/combine.cc +++ b/src/combine.cc @@ -124,7 +124,8 @@ void print_combine(struct text_object *obj, char *p, int p_max_size) generate_text_internal(&(buf[i][0]), max_user_text, *objsub); for(j=0; buf[i][j] != 0; j++) { if(buf[i][j] == '\t') buf[i][j] = ' '; - if(buf[i][j] == '\n' || buf[i][j] == 2) { //Some vars like $head use \002 instead of \n to separate lines + if(buf[i][j] == '\n') buf[i][j] = 0; //the vars inside combine may not have a \n at the end + if(buf[i][j] == 2) { // \002 is used instead of \n to separate lines inside a var buf[i][j] = 0; current[i]->row = strdup(&(buf[i][0])+nextstart); if(i==0 && (long)strlen(current[i]->row) > longest) longest = (long)strlen(current[i]->row);