kosma / minmea

a lightweight GPS NMEA 0183 parser library in pure C
Do What The F*ck You Want To Public License
791 stars 253 forks source link

minmea.c - Fix dereference of null pointer error caught by clang's sc… #64

Closed chmorgan closed 2 years ago

chmorgan commented 2 years ago

…an-build

Will re-push after the tests run. I don't have scan-build or clang tools here locally on osx, etc.

kosma commented 2 years ago

I have chosen to implement the fix differently, so that it doesn't incur a (small) performance penalty in the loop. I don't fully understand why scan-build complains in that place but not in others - but oh well, that null check is nice to have.

Merged - thanks for the PR, and sorry it took so long!