[Fixed] ACC Bug?

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49194
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

ACC Bug?

Post by Graf Zahl »

While working to extend the ACS-decompiler to support the ACSe format I discovered that if you use a prefix increment or decrement operator on an array variable without assigning the result to anything the compiler still creates code to push the array index twice onto the stack without ever using the duplicate:

The following line of source

Code: Select all

	++array2[5];

generates the following output:

Code: Select all

  167: PCD_PUSHBYTE 5
  216: PCD_DUP
  214: PCD_INCMAPARRAY 1
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm

Post by randi »

Fixed. If you want to fix it yourself too, just remove the PC_AppendCmd(PCD_DUP) call from LeadingIncDec in parse.c.

Return to “Closed Bugs [GZDoom]”