minmea.c - Fix dereference of null pointer error caught by clang's scan-build

This commit is contained in:
Kosma Moczek 2022-06-02 22:41:02 +02:00
parent 43ac660db6
commit 3e984ef657

View File

@ -93,6 +93,10 @@ bool minmea_scan(const char *sentence, const char *format, ...)
{ {
bool result = false; bool result = false;
bool optional = false; bool optional = false;
if (sentence == NULL)
return false;
va_list ap; va_list ap;
va_start(ap, format); va_start(ap, format);