Closed disconnect3d closed 6 years ago
Hey, thanks for the bug report.
I've changed the behavior here a bit: after piping user input to nasm we now capture both stdout (the bytecode) and stderr (warnings). If anything is written to stderr, we dump it and truncate the bytecode length to 0 so the state will be unchanged. In pipe mode this is an error and we exit(1). UI mode treats it as an assembly failure basically -- previously we would have warned and executed nasms best effort at assembling the instruction, now we warn and don't execute anything. I'd rather not make it an error, because the ui quitting due to the user entering an invalid instruction like this could be very annoying.
Does this work for you?
PS: I also found an fd leak when changing this :)
After:
The result in
rbx
is:The fact is that the first instruction is not really valid as the operand size is too big. Actually it prints out a warning about it, but it is super easy to miss it:
Can we make this warning an error and not continue on that?