meshtastic / framework-portduino

An Arduino API that sits on top of Linux and other operating systems. This lets you run Arduino code on Raspberry PI, desktops, etc... All as a standard user-space application.
GNU Lesser General Public License v2.1
22 stars 11 forks source link

Fix for case when `random` is called with same arguments #5

Closed GUVWAF closed 7 months ago

GUVWAF commented 9 months ago

Modulo of 0 results in undefined behavior. This logic is how it's done in the Arduino core.