cooljeanius / trousers-0.3.11.2

forked from Sourceforge to get it working on OSX
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Fix code scanning alert no. 1: Comparison of narrow type with wide type in loop condition #13

Closed cooljeanius closed 3 weeks ago

cooljeanius commented 3 weeks ago

Fixes https://github.com/cooljeanius/trousers-0.3.11.2/security/code-scanning/1

To fix the problem, we need to ensure that the variable i is of the same type as num_keys to avoid any type mismatch issues. The best way to fix this is to change the type of i from UINT16 to UINT32.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.