diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/definition.cpp | 2 |
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; } |