mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-18 13:04:36 +03:00
[Bug] Don't crash when formatting label without having an emitter
This commit is contained in:
@@ -123,6 +123,7 @@ Error formatLabel(
|
||||
|
||||
DebugUtils::unused(formatFlags);
|
||||
|
||||
if (emitter && emitter->code()) {
|
||||
const LabelEntry* le = emitter->code()->labelEntry(labelId);
|
||||
if (ASMJIT_UNLIKELY(!le))
|
||||
return sb.appendFormat("<InvalidLabel:%u>", labelId);
|
||||
@@ -146,9 +147,9 @@ Error formatLabel(
|
||||
ASMJIT_PROPAGATE(sb.appendFormat("L%u@", labelId));
|
||||
return sb.append(le->name());
|
||||
}
|
||||
else {
|
||||
return sb.appendFormat("L%u", labelId);
|
||||
}
|
||||
|
||||
return sb.appendFormat("L%u", labelId);
|
||||
}
|
||||
|
||||
Error formatRegister(
|
||||
|
||||
Reference in New Issue
Block a user