$i++;
# What if it was a multicolumn?
- $i++ while ${$row->{"cells"}}[$i]->{"multicolumn"} eq "part";
+ # $rcells holds a reference to the array of cells
+ my $rcells = \@{$row->{"cells"}};
+ # Paranoia check that we're not attempting to access beyond the
+ # end of the array in case reLyX failed to parse the number of
+ # columns correctly.
+ $i++ while ($i < @{$rcells} &&
+ ${$rcells}[$i]->{"multicolumn"} eq "part");
$row->{"curr_col"} = $i;
} # end of sub nextcol