Skip to content

Commit

Permalink
initTableRendMethods(): fix possible crash
Browse files Browse the repository at this point in the history
  • Loading branch information
poire-z committed Jun 5, 2022
1 parent de482f9 commit 53ea885
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crengine/src/lvtinydom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6243,6 +6243,9 @@ int initTableRendMethods( ldomNode * enode, int state )
printf("initTableRendMethods(%d): wrapping unproper %d>%d\n",
state, first_unproper, last_unproper);
#endif
if ( is_last && last_unproper < 0 ) { // (may happen with old gDOMVersionRequested)
last_unproper = cnt-1;
}
int elems_removed = last_unproper - first_unproper + 1;
ldomNode * tbox = enode->boxWrapChildren(first_unproper, last_unproper, el_tabularBox);
if ( tbox && !tbox->isNull() ) {
Expand Down

0 comments on commit 53ea885

Please sign in to comment.