summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/com/android/launcher2/InstallShortcutReceiver.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/launcher2/InstallShortcutReceiver.java b/src/com/android/launcher2/InstallShortcutReceiver.java
index 82fb3d154..eda82e098 100644
--- a/src/com/android/launcher2/InstallShortcutReceiver.java
+++ b/src/com/android/launcher2/InstallShortcutReceiver.java
@@ -174,8 +174,8 @@ public class InstallShortcutReceiver extends BroadcastReceiver {
cellY = item.cellY;
spanX = item.spanX;
spanY = item.spanY;
- for (int x = cellX; x < cellX + spanX && x < xCount; x++) {
- for (int y = cellY; y < cellY + spanY && y < yCount; y++) {
+ for (int x = cellX; 0 <= x && x < cellX + spanX && x < xCount; x++) {
+ for (int y = cellY; 0 <= y && y < cellY + spanY && y < yCount; y++) {
occupied[x][y] = true;
}
}