]> git.lyx.org Git - features.git/commitdiff
Fix bug #7106: iterator out of range while copying multi-row math.
authorVincent van Ravesteijn <vfr@lyx.org>
Tue, 4 Jan 2011 19:43:52 +0000 (19:43 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Tue, 4 Jan 2011 19:43:52 +0000 (19:43 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37108 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathGrid.cpp

index 163c6e61e6dd7cd7cf88b18f616b74e91e7ff8e2..ed38c920e493ade3f65cb53da10dcffe27703ee4 100644 (file)
@@ -67,9 +67,9 @@ static int extractInt(istream & is)
 static void resetGrid(InsetMathGrid & grid)
 {
        while (grid.ncols() > 1)
-               grid.delCol(grid.ncols());
+               grid.delCol(grid.ncols() - 1);
        while (grid.nrows() > 1)
-               grid.delRow(grid.nrows());
+               grid.delRow(grid.nrows() - 1);
        grid.cell(0).erase(0, grid.cell(0).size());
        grid.setDefaults();
 }