summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2016-03-18 18:31:03 (GMT)
committeralbert-github <albert.tests@gmail.com>2016-03-18 18:31:03 (GMT)
commitc2c9ed6bd2a94ad25f31a22f70489406c52e5e6f (patch)
tree19242469d4178f22e7228142511ffb5f53af5641 /src
parent7228bca81e8d054413f85f8758fc13866ab4b85b (diff)
downloadDoxygen-c2c9ed6bd2a94ad25f31a22f70489406c52e5e6f.zip
Doxygen-c2c9ed6bd2a94ad25f31a22f70489406c52e5e6f.tar.gz
Doxygen-c2c9ed6bd2a94ad25f31a22f70489406c52e5e6f.tar.bz2
Bug 763720 - Exclusion of a new line at the end of source code file causing nesting of HTML code for function documentation
Update based on comment by D.v.Heesch
Diffstat (limited to 'src')
-rw-r--r--src/definition.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/definition.cpp b/src/definition.cpp
index 86a616c..3800088 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -878,7 +878,7 @@ bool readCodeFragment(const char *fileName,
}
}
result = transcodeCharacterStringToUTF8(result);
- if (result.right(1) != "\n") result += "\n";
+ if (!result.isEmpty() && result.at(result.length()-1)!='\n') result += "\n";
//fprintf(stderr,"readCodeFragement(%d-%d)=%s\n",startLine,endLine,result.data());
return found;
}