isEmpty() dereferences pointer before checking if it is NULL.
Opened this issue · 0 comments
jpuderer commented
Adafruit_GPS/src/NMEA_parse.cpp
Line 851 in 4005211
I'm getting a crash in this library. I don't know if this is the root cause, but the logic in isEmpty is backwards.
The NULL check needs to happen before dereferencing the pointer.
Should be...
if (pStart != NULL && ',' != *pStart && '*' != *pStart)