ret2jazzy / disasm.pro

A realtime assembler/disassembler (formerly known as disasm.ninja)
https://disasm.pro/
291 stars 31 forks source link

Assembler output no longer shows bytes with hexadecimal letters correctly #3

Closed Karanum closed 1 year ago

Karanum commented 1 year ago

After the recent update to the website, the assembler has issues when the output bytes contain any A-F characters and outputs 0 for those bytes. Additionally, bytes where the most significant half is 0 will not show this leading 0 (e.g. 06 becomes just 6.) The raw string display option is fully broken as well and shows only zeroes. Disassembly still works as expected.

I think the issue is in using map over a Uint8Array in assemble.js. This returns a similarly typed array, so all byte strings are being parsed back to numbers, with non-number strings becoming 0.

ret2jazzy commented 1 year ago

Just got around to this. Thank you so much for the PR! Merging in.