Skip to content

Commit

Permalink
Fix rename catch on external funcs (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahaloz authored May 9, 2024
1 parent b919977 commit 4cec397
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion decomp2dbg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.9.0"
__version__ = "3.9.1"

try:
from .clients.client import DecompilerClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ public Map<String, Object> function_headers() {
var fm = program.getFunctionManager();
var functions = fm.getFunctions(true);
for (Function func : functions) {
if(func == null)
continue;

Map<String, Object> funcInfo = new HashMap<>();
funcInfo.put("name", func.getName());
funcInfo.put("size", (int) func.getBody().getNumAddresses());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,9 @@ else if(obj instanceof FunctionSymbol) {
var addr = sym.getAddress().getOffset();

var func = this.getCurrentProgram().getFunctionManager().getFunction(addr);
if(func == null)
continue;

Map<String, Object> funcInfo = new HashMap<>();
funcInfo.put("name", newName);
funcInfo.put("size", (int) func.getBody().getNumAddresses());
Expand Down

0 comments on commit 4cec397

Please sign in to comment.