Skip to content

Commit 44a23da

Browse files
radaretrufae
authored andcommitted
Fix stm8 pseudo return ##decompiler
1 parent 72bec87 commit 44a23da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libr/core/disasm.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,8 +1208,10 @@ static void ds_build_op_str(RDisasmState *ds, bool print_color) {
12081208
}
12091209
if (ds->pseudo) {
12101210
if (r_parse_parse (core->parser, ds->opstr, ds->str)) {
1211-
free (ds->opstr);
1212-
ds->opstr = strdup (ds->str);
1211+
if (R_STR_ISNOTEMPTY (ds->str)) {
1212+
free (ds->opstr);
1213+
ds->opstr = strdup (ds->str);
1214+
}
12131215
}
12141216
}
12151217
if (ds->subjmp) {

0 commit comments

Comments
 (0)