X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/22c956d8a69985fa968404377c09d0d98e07a2b3..03d51a2d4095e3a2da174f8d6963c4802e636e95:/src/html/htmlcell.cpp?ds=inline diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index 37514300b3..4747a35f43 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -775,7 +775,7 @@ void wxHtmlContainerCell::Layout(int w) // between two cells separated by, e.g. font change, cell which // is wrong - const int step = s_width - xpos; + int step = s_width - xpos; if ( step > 0 ) { // first count the cells which will get extra space @@ -818,8 +818,14 @@ void wxHtmlContainerCell::Layout(int w) } } } + else + { + // this will cause the code to enter "else branch" below: + step = 0; + } } - else // no extra space to distribute + // else branch: + if ( step <= 0 ) // no extra space to distribute { // just set the indent properly while (line != cell)