diff paraspace/injection.py @ 107:4b3573d039af

Fix bug of DEXFile_linked.find_method_name_proto(). - It miss understood structure of _DEX_Method to get associated _DEX_ProtoId.
author Thinker K.F. Li <thinker@codemud.net>
date Sat, 30 Jul 2011 22:59:09 +0800
parents 7821c6e89622
children 18be67af7f1e
line wrap: on
line diff
--- a/paraspace/injection.py	Fri Jul 29 16:17:15 2011 +0800
+++ b/paraspace/injection.py	Sat Jul 30 22:59:09 2011 +0800
@@ -255,11 +255,9 @@
                 new_method = dex.find_method_name_proto(method_name,
                                                         method_proto,
                                                         classdef)
-            except:
-                print 'NOT FOUND', method_name, method_proto, dex.get_classdef_name(classdef)
-                print DEXFile_linked.dump_protoid(method_proto)
+            except ValueError:
                 return opcode, args
-            new_method_idx = dex.get_index_method(new_method)
+            new_method_idx = dex.get_idx_method(new_method)
             return opcode, (args[0], args[1], new_method_idx,
                             args[3], args[4], args[5], args[6])
         return opcode, args