MemeAssembly icon indicating copy to clipboard operation
MemeAssembly copied to clipboard

[Bug] `who would win?`-comparisons with negative numbers result in invalid labels

Open kammt opened this issue 3 years ago • 0 comments

Describe the bug Negative numbers are accepted in comparisons, yet as will reject the generated labels due to a - being in them Possible workaround: Convert parameter to Hex before translation

To Reproduce

I like to have fun, fun, fun, fun, fun, fun, fun, fun, fun, fun main
    who would win? rax or -1

   rax wins
   -1 wins
   right back at ya, buckaroo

results in the following error messages:

{standard input}: Assembler messages:
{standard input}:65: Error: junk `Wins_0' after expression
{standard input}:67: Error: unknown pseudo-op: `.l'
gcc exited unexpectedly with exit code 256. If you did not expect this to happen, please report this issue at https://github.com/kammt/MemeAssembly/issues so that it can be fixed

Line 65 being .L-1Wins_0:

Reported by @0li5Drr

kammt avatar Jun 19 '22 09:06 kammt