Correction in checksum calculation for NMEA
The number of bytes to be written for the checksum exceeded the buffer length. This change corrects makes the correction. Change-Id: If90c6f5b2006a013a096a767334deac1555553f1 CRs-fixed: 468553
This commit is contained in:
parent
013abecbba
commit
a50977f5e2
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ int loc_eng_nmea_put_checksum(char *pNmea, int maxSize)
|
|||
length++;
|
||||
}
|
||||
|
||||
int checksumLength = snprintf(pNmea, maxSize,"*%02X\r\n", checksum);
|
||||
int checksumLength = snprintf(pNmea,(maxSize-length-1),"*%02X\r\n", checksum);
|
||||
return (length + checksumLength);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue