Weridness when using += or ++ with uninitialized variables

Reporter: Regnsloja  |  Status: open  |  Last Modified: October 23, 2022, 08:26:21 am

When dealing with a previously uninitialized variables, the follow does not work properly:

variable += 1

This also does not work properly:

variable++

But the following does work:

variable = variable + 1

And this also works:

variable = 0 (somewhere during a creation step, not here right before the incrementing as that would "work" but lock it at 1 obviously)
variable += 1

Why or how I don't know, I was just trying to get someone elses simple old project to work properly and this change got a lot of stuff working in it.

Please sign in to post comments, or you can view this issue on GitHub.