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:
Tushar Janefalkar 2013-03-30 22:50:57 -07:00 committed by Gerrit - the friendly Code Review server
parent 013abecbba
commit a50977f5e2

View file

@ -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);
}