adafruit / Adafruit_IO_Arduino

Arduino library to access Adafruit IO from WiFi, cellular, and ethernet modules.
Other
210 stars 107 forks source link

Don't compare nullptr string - Fixes #120 #121

Closed phord closed 4 years ago

phord commented 4 years ago

In AdafruitIO_Group::call there is a comparison with the feedname of the update. If the onMessage() call didn't provide a feed name, the feed pointer is null. The code also checks for this, but it does it after comparing with a string. Reverse the check so a short-circuiting or can do the right thing.