Fix an infinite loop in findMethodByMethodIdInternal
diff --git a/dexlib/src/main/java/org/jf/dexlib/ClassDataItem.java b/dexlib/src/main/java/org/jf/dexlib/ClassDataItem.java
index 89a6965..c75f377 100644
--- a/dexlib/src/main/java/org/jf/dexlib/ClassDataItem.java
+++ b/dexlib/src/main/java/org/jf/dexlib/ClassDataItem.java
@@ -388,8 +388,14 @@
             if (encodedMethodIndex == methodIdItemIndex) {
                 return encodedMethod;
             } else if (encodedMethodIndex < methodIdItemIndex) {
+                if (min == index) {
+                    break;
+                }
                 min = index;
             } else {
+                if (max == index) {
+                    break;
+                }
                 max = index;
             }
         }