Protect the pointer array.
This commit is contained in:
parent
12396b5f1f
commit
08844423e3
|
@ -129,7 +129,7 @@ void CGPSHandler::processNMEA()
|
|||
|
||||
char* p = NULL;
|
||||
char* d = (char*)(m_data + 1U);
|
||||
while ((p = ::strtok(d, ",\r\n")) != NULL) {
|
||||
while ((p = ::strtok(d, ",\r\n")) != NULL && nRMC < 20U) {
|
||||
pRMC[nRMC++] = p;
|
||||
d = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue