]> git.ipfire.org Git - location/libloc.git/commitdiff
country: Remove string termination
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 15 Oct 2019 14:01:30 +0000 (14:01 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 15 Oct 2019 14:01:30 +0000 (14:01 +0000)
This should not be necessary and overwrites the buffer
in some cases.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/loc/country.h

index e247d524b9ac0b15e1144b412c602c8a3ebc5676..6dfb47ba3204b0208e3349b3b007544d6ab4316a 100644 (file)
@@ -68,9 +68,6 @@ static inline void loc_country_code_copy(char* dst, const char* src) {
     for (unsigned int i = 0; i < 2; i++) {
         dst[i] = src[i];
     }
-
-    // Terminate the string
-    dst[2] = '\0';
 }
 
 #endif