Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UPBGE: Fix python setUseExternalTime call.
Python can't convert a boolean argument from python to a bool in C through PyArg_ParseTuple. Else a stack smashing appears (maybe writing a int to a bool and resulting in overflow). This error is so easy to make and nothing could show it at compilation. Be aware of this.
- Loading branch information
fa20294
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello! in if (!PyArg_ParseTuple(args, "p: what is the "p"? I'm used to see i for int iirc
fa20294
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"p" is for true or false objects, "i" works too, but it should failed in python when we sent a object which is true but not an integer or a boolean.