summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2018-09-04 17:32:31 +0200
committerKai Koehne <kai.koehne@qt.io>2018-09-06 14:32:09 +0000
commitaac2b1cdbb4003fd8427be628d33c7e2f6d66aaa (patch)
treeea24299433ef91aba0e7e8283677f19b551c00c0 /src
parent6b20b67ff1781790158b03c5d58f5ddb50b109a3 (diff)
Fix crash when expanding macros in sections
Do not rely on endPos, but instead use the length of the macro already calculated. This amends commit 85bc558660 . Task-number: QTBUG-67818 Change-Id: Icc0268e67eceee83bb5510b5199684c465b2dd56 Reviewed-by: Martin Smith <martin.smith@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/qdoc/doc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qdoc/doc.cpp b/src/qdoc/doc.cpp
index 29f1eed77..2b25f3b3a 100644
--- a/src/qdoc/doc.cpp
+++ b/src/qdoc/doc.cpp
@@ -2136,7 +2136,7 @@ bool DocParser::expandMacro()
QString expanded = expandMacroToString(cmdStr,
macro.defaultDef,
macro.numParams);
- input_.replace(backslashPos, endPos - backslashPos, expanded);
+ input_.replace(backslashPos, pos - backslashPos, expanded);
len = input_.length();
pos = backslashPos;
return true;