mirror of
https://github.com/radareorg/radare2.git
synced 2025-03-04 12:27:40 +00:00
Mangling functions should accept NULL binfile
This commit is contained in:
parent
9e7e751958
commit
34a6cda6f8
@ -84,9 +84,11 @@ R_API char *r_bin_demangle_cxx(RBinFile *binfile, const char *str, ut64 vaddr) {
|
||||
}
|
||||
if (nerd && *nerd) {
|
||||
*nerd = 0;
|
||||
RBinSymbol *sym = r_bin_class_add_method (binfile, out, nerd + 2, 0);
|
||||
if (sym) {
|
||||
sym->vaddr = vaddr;
|
||||
if (binfile) {
|
||||
RBinSymbol *sym = r_bin_class_add_method (binfile, out, nerd + 2, 0);
|
||||
if (sym) {
|
||||
sym->vaddr = vaddr;
|
||||
}
|
||||
}
|
||||
*nerd = ':';
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ R_API char *r_bin_demangle_objc(RBinFile *binfile, const char *sym) {
|
||||
int i, nargs = 0;
|
||||
const char *type = NULL;
|
||||
|
||||
if (!binfile || !sym) {
|
||||
if (!sym) {
|
||||
return NULL;
|
||||
}
|
||||
if (binfile && binfile->o && binfile->o->classes) {
|
||||
@ -131,7 +131,6 @@ R_API char *r_bin_demangle_objc(RBinFile *binfile, const char *sym) {
|
||||
ret = r_str_newf ("%s int %s::%s(%s)", type, clas, name, args);
|
||||
if (binfile) {
|
||||
r_bin_class_add_method (binfile, clas, name, nargs);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user