[Fixed] ACC Bug?

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

ACC Bug?

Postby Graf Zahl » Sat Dec 13, 2003 9:16 am

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 allExpand view
   ++array2[5];



generates the following output:

Code: Select allExpand view
  167: PCD_PUSHBYTE 5
  216: PCD_DUP
  214: PCD_INCMAPARRAY 1
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Postby randi » Tue Jan 13, 2004 2:51 pm

Fixed. If you want to fix it yourself too, just remove the PC_AppendCmd(PCD_DUP) call from LeadingIncDec in parse.c.
User avatar
randi
Site Admin
 
Joined: 09 Jul 2003


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests