diff options
author | Sebastian Geerken <devnull@localhost> | 2014-04-03 19:25:19 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-04-03 19:25:19 +0200 |
commit | 6aebada7acdfaaca0e27d24eb84c9398787a7e89 (patch) | |
tree | 98a8d3fc5d0a1cf5c74926bc4b77bb29233dfb97 /dw/textblock_linebreaking.cc | |
parent | 560193e2a5fce15db3c272520220877a7ee61567 (diff) |
Fixed initialization problem.
Diffstat (limited to 'dw/textblock_linebreaking.cc')
-rw-r--r-- | dw/textblock_linebreaking.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dw/textblock_linebreaking.cc b/dw/textblock_linebreaking.cc index 3b3a55e7..d4e3343f 100644 --- a/dw/textblock_linebreaking.cc +++ b/dw/textblock_linebreaking.cc @@ -716,7 +716,7 @@ bool Textblock::wrapWordInFlow (int wordIndex, bool wrapAll) if(newLine) { accumulateWordData (wordIndex); - int wordIndexEnd, breakPos = + int wordIndexEnd = wordIndex, breakPos = searchBreakPos (wordIndex, firstIndex, &searchUntil, tempNewLine, penaltyIndex, thereWillBeMoreSpace, wrapAll, &wordListChanged, &wordIndexEnd); @@ -825,6 +825,7 @@ bool Textblock::wrapWordInFlow (int wordIndex, bool wrapAll) } // *height must be initialized, but not *breakPos. +// *wordIndexEnd must be initialized (initially to wordIndex) void Textblock::balanceBreakPosAndHeight (int wordIndex, int firstIndex, int *searchUntil, bool tempNewLine, int penaltyIndex, @@ -890,6 +891,7 @@ void Textblock::balanceBreakPosAndHeight (int wordIndex, int firstIndex, } } +// *wordIndexEnd must be initialized (initially to wordIndex) int Textblock::searchBreakPos (int wordIndex, int firstIndex, int *searchUntil, bool tempNewLine, int penaltyIndex, bool thereWillBeMoreSpace, bool wrapAll, @@ -905,8 +907,6 @@ int Textblock::searchBreakPos (int wordIndex, int firstIndex, int *searchUntil, int result; bool lineAdded; - *wordIndexEnd = wordIndex; - do { DBG_OBJ_MSG ("construct.word", 1, "<i>searchBreakPos loop cycle</i>"); DBG_OBJ_MSG_START (); |