Fix bug where it wasn't possible to add widgets

- Happened when you were down to 0 widgets (which
won't be possible in future, but fixing this as
well)
This commit is contained in:
Michael Jurka
2012-10-26 16:06:12 -07:00
parent 011717d064
commit 229dd8b355

View File

@@ -1125,7 +1125,7 @@ public class LockPatternUtils {
if (widgets == null) {
return false;
}
if (index < 0 || index >= widgets.length) {
if (index < 0 || index > widgets.length) {
return false;
}
int[] newWidgets = new int[widgets.length + 1];