From 983777535eb72de453cd84f73d791108d5453b81 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 16 Dec 2021 19:30:59 +0100 Subject: GitHub #329: fixed missing code Commented out code was obsolete. line_len was a true bug which can shred the end of lines. Removed Warning --- fluid/code.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fluid/code.cxx') diff --git a/fluid/code.cxx b/fluid/code.cxx index ec61902f1..a28961028 100644 --- a/fluid/code.cxx +++ b/fluid/code.cxx @@ -419,15 +419,15 @@ void write_c_indented(const char *textlines, int inIndent, char inTrailwWith) { if (newline) line_len = (int)(newline-textlines); else - line_len = strlen(textlines); + line_len = (int)strlen(textlines); if (textlines[0]=='\n') { // avoid trailing spaces } else if (textlines[0]=='#') { // don't indent preprocessor statments starting with '#' - write_c("%.*s", (int)(newline-textlines), textlines); + write_c("%.*s", line_len, textlines); } else { // indent all other text lines - write_c("%s%.*s", indent(), (int)(newline-textlines), textlines); + write_c("%s%.*s", indent(), line_len, textlines); } if (newline) { write_c("\n"); -- cgit v1.2.3