Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb8c841e authored by Jeff Brown's avatar Jeff Brown
Browse files

Terminate loop properly when cursor window is full.

The existing code exits the column-filling loop immediately but
may continue to try to fill rows.  Ordinarily this should fail
too but it's possible for the process to continue and then
blow up a little later.  Fixed this problem by exiting the row-
filling loop promptly.

Bug: 21406130
Change-Id: Ifab59188d5d1b40f3c1f5c97604dd48da71bf37b
parent 765389ec
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -270,7 +270,7 @@ public class DatabaseUtils {
        window.setStartPosition(position);
        window.setNumColumns(numColumns);
        if (cursor.moveToPosition(position)) {
            do {
            rowloop: do {
                if (!window.allocRow()) {
                    break;
                }
@@ -307,7 +307,7 @@ public class DatabaseUtils {
                    }
                    if (!success) {
                        window.freeLastRow();
                        break;
                        break rowloop;
                    }
                }
                position += 1;