On Fri, Dec 14, 2001 at 08:42:32AM +0100, Michael Schmitt wrote: > Adding a column after the last column of a table still causes a freed > memory access error! (Use "njamd", a fast memory checker, to check this)
well, this patch doesn't make njamd complain, and things still work. I'm not proposing this as a fix because I can't be bothered to decipher the code and check everything is OK ... regards john Index: tabular.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/tabular.C,v retrieving revision 1.107 diff -u -r1.107 tabular.C --- tabular.C 2001/12/11 17:26:51 1.107 +++ tabular.C 2001/12/14 09:20:31 @@ -307,12 +307,12 @@ c_info[i][j] = cell_info[i][j - 1]; } // care about multicolumns - if (cell_info[i][column + 1].multicolumn==CELL_BEGIN_OF_MULTICOLUMN) { - cell_info[i][column + 1].multicolumn = CELL_PART_OF_MULTICOLUMN; + if (c_info[i][column + 1].multicolumn==CELL_BEGIN_OF_MULTICOLUMN) { + c_info[i][column + 1].multicolumn = CELL_PART_OF_MULTICOLUMN; } if ((column + 1) == columns_ || - cell_info[i][column + 2].multicolumn != CELL_PART_OF_MULTICOLUMN) { - cell_info[i][column + 1].multicolumn = LyXTabular::CELL_NORMAL; + c_info[i][column + 2].multicolumn != CELL_PART_OF_MULTICOLUMN) +{ + c_info[i][column + 1].multicolumn = LyXTabular::CELL_NORMAL; } } cell_info = c_info; -- "Of all manifestations of power, restraint impresses the most." - Thucydides