pikasTech / PikaPython

An ultra-lightweight Python interpreter that runs with only 4KB of RAM, zero dependencies. It is ready to use out of the box without any configuration required and easy to extend with C. Similar project: MicroPython, JerryScript.
http://pikapython.com/
MIT License
1.45k stars 132 forks source link

Fix incorrect printf format specifier #337

Open szsam opened 4 months ago

szsam commented 4 months ago

PRI macros should be used for uintptr_t. Calling a printf-like function with the wrong type of arguments causes unpredictable behavior.

pikasTech commented 4 months ago

I am not sure if <inttypes.h> can be used on various embedded platforms, such as stm32 and other MCU SDKs. This requires some testing, and I will validate these platforms when I have time, so this pull request will be delayed. It would be even better if you could help with testing.