X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/721ab9053804ef63e42f33841e242753f1ed66aa..399b60a0ad232265cd74ce8bf6a53a1f2cc57ff2:/src/html/htmlcell.cpp?ds=inline diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index 7b6eb3aacd..0ca4bb2524 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -439,12 +439,14 @@ void wxHtmlContainerCell::Layout(int w) int counter = 0; int step = (s_width - xpos); if (step < 0) step = 0; - while (line != cell) { + xcnt--; + if (xcnt > 0) while (line != cell) { line -> SetPos(line -> GetPosX() + s_indent + (counter++ * step / xcnt), ypos + line -> GetPosY()); line = line -> GetNext(); } + xcnt++; } ypos += ysizedown;