diff options
author | Joseph Herlant <herlantj@gmail.com> | 2018-09-09 21:03:28 -0700 |
---|---|---|
committer | Joseph Herlant <herlantj@gmail.com> | 2018-09-09 21:03:28 -0700 |
commit | ab3ea10d69a4ab1989a31b0b2d02dd91a84a3357 (patch) | |
tree | adb4ae60098c8e1dd21d9484725eb04f4fc0a7d7 | |
parent | 309cc41973dac7a1ad5137450b105889802b5083 (diff) | |
download | navit-ab3ea10d69a4ab1989a31b0b2d02dd91a84a3357.tar.gz |
cleanup:coord:Move from strncpy to g_strlcpyaerostitch/coord_strcmp
-rw-r--r-- | navit/coord.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/navit/coord.c b/navit/coord.c index a0ad12ffe..bb16978c8 100644 --- a/navit/coord.c +++ b/navit/coord.c @@ -157,8 +157,7 @@ int coord_parse(const char *coord_input, enum projection output_projection, stru co=strchr(str,':'); if (co && co < s) { proj=g_malloc(co-str+1); - strncpy(proj, str, co-str); - proj[co-str]='\0'; + g_strlcpy(proj, str, 1+co-str); dbg(lvl_debug,"projection=%s", proj); str=co+1; s=strchr(str,' '); |