Fixed memory bug in append column.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3226 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2001-12-17 13:40:04 +00:00
parent bc20177045
commit 06b132ec14

View File

@ -307,12 +307,12 @@ void LyXTabular::AppendColumn(int cell)
c_info[i][j] = cell_info[i][j - 1]; c_info[i][j] = cell_info[i][j - 1];
} }
// care about multicolumns // care about multicolumns
if (cell_info[i][column + 1].multicolumn==CELL_BEGIN_OF_MULTICOLUMN) { if (c_info[i][column + 1].multicolumn==CELL_BEGIN_OF_MULTICOLUMN) {
cell_info[i][column + 1].multicolumn = CELL_PART_OF_MULTICOLUMN; c_info[i][column + 1].multicolumn = CELL_PART_OF_MULTICOLUMN;
} }
if ((column + 1) == columns_ || if ((column + 1) == columns_ ||
cell_info[i][column + 2].multicolumn != CELL_PART_OF_MULTICOLUMN) { c_info[i][column + 2].multicolumn != CELL_PART_OF_MULTICOLUMN) {
cell_info[i][column + 1].multicolumn = LyXTabular::CELL_NORMAL; c_info[i][column + 1].multicolumn = LyXTabular::CELL_NORMAL;
} }
} }
cell_info = c_info; cell_info = c_info;