Return the correct length of nmea sentence.

Return the correct length of nmea sentence in the
function loc_eng_nmea_put_checksum(). The correct
length is length of NMEA string including ‘$’
character alongwith length of checksum.

FP2: Reapplying patch to the msm8974 sources as well.

Issue: FP2P-221
CRs-Fixed: 1020044
Change-Id: I45a086190008df79a93b9386bc69d9c50e47c93b
(cherry picked from commit 76733cd8ab68f9f167e52a68128fe2edc1636928)
diff --git a/msm8974/loc_api/libloc_api_50001/loc_eng_nmea.cpp b/msm8974/loc_api/libloc_api_50001/loc_eng_nmea.cpp
index e6fbec8..69173c3 100644
--- a/msm8974/loc_api/libloc_api_50001/loc_eng_nmea.cpp
+++ b/msm8974/loc_api/libloc_api_50001/loc_eng_nmea.cpp
@@ -93,8 +93,12 @@
         length++;
     }
 
+    // length now contains nmea sentence string length not including $ sign.
     int checksumLength = snprintf(pNmea,(maxSize-length-1),"*%02X\r\n", checksum);
-    return (length + checksumLength);
+
+    // total length of nmea sentence is length of nmea sentence inc $ sign plus
+    // length of checksum (+1 is to cover the $ character in the length).
+    return (length + checksumLength + 1);
 }
 
 /*===========================================================================