Condition being considered false while it should be true

I have a button class deriving from CommonButtonBase, and for some reason this “else if” conditional statement is considering the variable “bButtonEnabled” as false when it is true.

In this conditional statement, UseStyle should get set to NormalStyle, then the “else” statement should be skipped over (so long as bButtonEnabled is true) right?

Well the debugger tells me that bButtonEnabled is 1 (meaning it should be read as true)

Yet somehow it seems that the “else” condition is triggered anyway somehow.

You’re not debugging in release mode by any chance? In release mode, the compiler can optimize which style to choose from and just use one of the statements for the assignment.

I’ve debugged from Development and DebugGame build configurations from rider if that’s what you’re asking.

Now if you’re asking about the engine build, I’m using the precompiled binaries from the epic games store rather than building from source.