[Fixed] Semicolon after if skips error checking.

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.

Semicolon after if skips error checking.

Postby Accensus » Tue Jun 15, 2021 8:09 am

Take the following code for example. "lol" is not an identifier and would normally error out on launch. However, if you put a semicolon right after the if statement, no error will show up and the game will launch. Tested on 4.6.0.
Code: Select allExpand view
class TestActor : Actor
{
   override void PostBeginPlay()
   {
      if (lol);
      {
         Console.Printf("Lorem ipsum.");
      }
      Super.PostBeginPlay();
   }
}
Accensus
 
Joined: 11 Feb 2016

Re: Semicolon after if skips error checking.

Postby Graf Zahl » Tue Jun 15, 2021 8:29 am

Looks like the empty 'if' gets deleted before its condition is checked...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Semicolon after if skips error checking.

Postby Graf Zahl » Tue Aug 10, 2021 11:03 am

fixed
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest