summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-01-27 14:32:48 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-27 14:33:45 (GMT)
commit6f7f293562b1dd2ad7de39ffec9a50f518f72341 (patch)
treef00177023f620bcaeab5a51c3f47210bab5f7e1f /Source
parentd5f54967831851a5625b05920939004f1bb0c92e (diff)
parent4a3a7d5f5d02ce6c160f3f56e94c7e8b84e69b44 (diff)
downloadCMake-6f7f293562b1dd2ad7de39ffec9a50f518f72341.zip
CMake-6f7f293562b1dd2ad7de39ffec9a50f518f72341.tar.gz
CMake-6f7f293562b1dd2ad7de39ffec9a50f518f72341.tar.bz2
Merge topic 'cpack-dmg-breaklongline'
4a3a7d5f5d CPack/DragNDrop: Fix word corruption in BreakLongLines Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4275
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index ad8f50f..fe7abf4 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -899,8 +899,9 @@ bool cmCPackDragNDropGenerator::BreakLongLine(const std::string& line,
std::string* error)
{
const size_t max_line_length = 512;
- for (size_t i = 0; i < line.size(); i += max_line_length) {
- size_t line_length = max_line_length;
+ size_t line_length = max_line_length;
+ for (size_t i = 0; i < line.size(); i += line_length) {
+ line_length = max_line_length;
if (i + line_length > line.size()) {
line_length = line.size() - i;
} else {