mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-27 02:19:10 +00:00
tex2lyx/table.cpp: fix bug #8204 also for branch (prevent crash if TeX files define wrong table column numbers)
This commit is contained in:
parent
451ee220f4
commit
b835e6e03b
@ -1156,8 +1156,20 @@ void handle_tabular(Parser & p, ostream & os, string const & name,
|
||||
cellinfo[row][col].content += os.str();
|
||||
|
||||
// add dummy cells for multicol
|
||||
for (size_t i = 0; i < ncells - 1 && col < colinfo.size(); ++i) {
|
||||
for (size_t i = 0; i < ncells - 1; ++i) {
|
||||
++col;
|
||||
if (col >= colinfo.size()) {
|
||||
cerr << "The cell '"
|
||||
<< cells[cell]
|
||||
<< "' specifies "
|
||||
<< convert<string>(ncells)
|
||||
<< " columns while the table has only "
|
||||
<< convert<string>(colinfo.size())
|
||||
<< " columns!"
|
||||
<< " Therefore the surplus columns will be ignored."
|
||||
<< endl;
|
||||
break;
|
||||
}
|
||||
cellinfo[row][col].multi = CELL_PART_OF_MULTICOLUMN;
|
||||
cellinfo[row][col].align = 'c';
|
||||
}
|
||||
|
@ -276,6 +276,8 @@ What's new
|
||||
|
||||
- Fix missing backslash in import of \def ... \csname ... \endcsname (bug 8116).
|
||||
|
||||
- Fix crash if TeX-files contain table logic bugs (bug 8204).
|
||||
|
||||
|
||||
* ADVANCED FIND AND REPLACE
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user