summaryrefslogtreecommitdiff
path: root/plugins/Msg_Export/src/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Msg_Export/src/utils.cpp')
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index 6f0a26d065..f3296752ed 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -1308,7 +1308,9 @@ bool bWriteIndentedToFile(HANDLE hFile, int nIndent, const wchar_t *pszSrc, bool
if (pszSrc[nLineLen] == '\n' || pszSrc[nLineLen] == '\r')
break;
- if (nLineLen >= nMaxLineWidth) { // ok the line was not broken. we need to force a break
+ // if user set nMaxLineWidth to 0, we don't break anything, otherwise check the length
+ if (nMaxLineWidth != 0 && nLineLen >= nMaxLineWidth) {
+ // ok the line was not broken. we need to force a break
// we will scan backwards again to finde a space !!
// then we will look for a ? and so on.