CNMAT / OSC

OSC: Arduino and Teensy implementation of OSC encoding
cnmat.berkeley.edu/oscuino
Other
727 stars 135 forks source link

OSCMessage::getOSCData() can render message unusable #129

Open h4yn0nnym0u5e opened 2 years ago

h4yn0nnym0u5e commented 2 years ago

If you pass a position parameter greater than the number of available data items, the message's error gets set to INDEX_OUT_OF_BOUNDS, in addition to a NULL pointer being being returned. This is extremely unhelpful, as there's nothing wrong with the message, and it means any further attempts to access the data items return incorrect values. Since there's no way of resetting the error code, a previously perfectly good message is rendered useless.