diff --git a/src/alloy/compiler/passes/finalization_pass.cc b/src/alloy/compiler/passes/finalization_pass.cc index 3fa3fc1b6..9a430ecc1 100644 --- a/src/alloy/compiler/passes/finalization_pass.cc +++ b/src/alloy/compiler/passes/finalization_pass.cc @@ -44,9 +44,9 @@ int FinalizationPass::Run(HIRBuilder* builder) { auto label = block->label_head; while (label) { if (!label->name) { - char* name = (char*)arena->Alloc(6 + 4 + 1); - xestrcpya(name, 6 + 1, "_label"); - char* part = _itoa(label->id, name + 6, 10); + const size_t label_len = 6 + 4 + 1; + char* name = (char*)arena->Alloc(label_len); + xesnprintf(name, label_len, "_label%d", label->id); label->name = name; } label = label->next;