1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:27:43 +00:00

LibX86: Fix duplicate '+' in SIB byte disassembly

For SIB bytes with base but no index, we were emitting two '+' chars
which looked very off.
This commit is contained in:
Andreas Kling 2020-04-11 23:09:54 +02:00
parent 8ef9c272b6
commit 8daddcfa0a

View file

@ -1170,7 +1170,8 @@ static String sib_to_string(u8 rm, u8 sib)
builder.append(scale);
} else {
builder.append(base);
builder.append('+');
if (!base.is_empty() && !index.is_empty())
builder.append('+');
builder.append(index);
builder.append(scale);
}