OSDN Git Service

fillWindow's start position must be smaller than getCount value
authorTatsuo Nagamatsu <nagamatu@gmail.com>
Sun, 6 Jun 2010 17:07:51 +0000 (02:07 +0900)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Fri, 5 Aug 2011 08:05:33 +0000 (16:05 +0800)
Change-Id: I3664ae8f6172f02bf6e2472320e79e3bf8683cc0

core/java/android/database/AbstractCursor.java

index 038eedf..a5e5e46 100644 (file)
@@ -204,7 +204,7 @@ public abstract class AbstractCursor implements CrossProcessCursor {
      * @param window
      */
     public void fillWindow(int position, CursorWindow window) {
-        if (position < 0 || position > getCount()) {
+        if (position < 0 || position >= getCount()) {
             return;
         }
         window.acquireReference();