Remove existing string before converting to code (#2803)

This commit is contained in:
Dhruv Maroo 2021-10-17 22:37:59 +05:30 committed by GitHub
parent af01134ae3
commit 4ec0a076b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -782,7 +782,9 @@ void CutterCore::editBytesEndian(RVA addr, const QString &bytes)
void CutterCore::setToCode(RVA addr) void CutterCore::setToCode(RVA addr)
{ {
cmdRawAt("Cd-", addr); CORE_LOCK();
rz_meta_del(core->analysis, RZ_META_TYPE_STRING, core->offset, 1);
rz_meta_del(core->analysis, RZ_META_TYPE_DATA, core->offset, 1);
emit instructionChanged(addr); emit instructionChanged(addr);
} }