diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 0fbfd0c9ef8..c64ed284c11 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -1678,7 +1678,7 @@ MakefileGenerator::replaceExtraCompilerVariables( fullVal = val.join(' '); } ret.replace(match.capturedStart(), match.capturedLength(), fullVal); - rep = match.capturedStart(), fullVal.length(); + rep += fullVal.length(); } else { rep = match.capturedEnd(); }