The problem is ZScript compiler does not add implicit scope for if statement without curly brackets.
So expression after if condition belongs to the current scope allowing errors like I found.
[since Aug 19] More HD crashing woes
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.
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.
Re: [since Aug 19] More HD crashing woes
I've added some precautions against 'scope leaking' variables in 57de598.
So they no longer cause an undefined behavior. Referencing such variable outside of its scope is a compilation error.
Please post a new report if there will some crashes with the latest code.
So they no longer cause an undefined behavior. Referencing such variable outside of its scope is a compilation error.
Please post a new report if there will some crashes with the latest code.