box_norm fix

This commit is contained in:
p.kosyh 2009-11-24 07:48:47 +00:00
parent 8b868c3ee1
commit bcfda49d4c

View file

@ -1906,14 +1906,14 @@ void txt_box_norm(textbox_t tbox)
{
struct textbox *box = (struct textbox *)tbox;
struct line *line;
int off = box->off;
if (!box->lay)
return;
for (line = box->lay->lines; line; line = line->next) {
if (box->off < line->h) {
box->line = line;
if (off < line->h)
break;
}
box->off -= line->h;
off -= line->h;
}
box->line = box->lay->lines;
}