Skip to content

Commit c0e2f83

Browse files
committed
Output negative values with correct with in .sym files
1 parent 8883251 commit c0e2f83

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/link/output.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ static void writeSym() {
585585
< std::tie(std::get<int32_t>(sym2->data), sym2->name);
586586
});
587587
for (Symbol *sym : constants) {
588-
int32_t val = std::get<int32_t>(sym->data);
588+
uint32_t val = static_cast<uint32_t>(std::get<int32_t>(sym->data));
589589
int width = val < 0x100 ? 2 : val < 0x10000 ? 4 : 8;
590590
fprintf(symFile, "%0*" PRIx32 " ", width, val);
591591
writeSymName(sym->name, symFile);

0 commit comments

Comments
 (0)