fixed the missing space reserve

This commit is contained in:
zanostro 2025-12-15 12:52:37 +01:00
parent d3e08abd30
commit e0ce2fb3d0

View file

@ -450,16 +450,6 @@ std::string Code::emitText() {
while (textStart < code.size()) { while (textStart < code.size()) {
int textLength = std::min(30, (int)code.size() - textStart); int textLength = std::min(30, (int)code.size() - textStart);
// Skip all-zero sections for RESW/RESB
bool allZeros = true;
for (int i = 0; i < textLength; ++i) {
if (code[textStart + i] != 0) {
allZeros = false;
break;
}
}
if (!allZeros) {
oss << "T "; oss << "T ";
oss << std::setfill('0') << std::setw(6) << std::hex << std::uppercase << (_startAddress + textStart) << " "; oss << std::setfill('0') << std::setw(6) << std::hex << std::uppercase << (_startAddress + textStart) << " ";
oss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase << textLength << " "; oss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase << textLength << " ";
@ -468,7 +458,6 @@ std::string Code::emitText() {
oss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase << (int)code[textStart + i]; oss << std::setfill('0') << std::setw(2) << std::hex << std::uppercase << (int)code[textStart + i];
} }
oss << "\n"; oss << "\n";
}
textStart += textLength; textStart += textLength;
} }