Its a c-string we put, so it must be null-terminated.

Signed-off-by: Anton Lundin <gla...@acc.umu.se>
---
 save-xml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/save-xml.c b/save-xml.c
index 54a0a86..227b952 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -191,7 +191,7 @@ static void show_location(struct membuffer *b, struct dive 
*dive)
 
                len += format_location(buffer + len, latitude, longitude);
                if (!dive->location) {
-                       memcpy(buffer + len, "/>\n", 4);
+                       memcpy(buffer + len, "/>\n\0", 5);
                        put_string(b, buffer);
                        return;
                }
-- 
1.9.1

_______________________________________________
subsurface mailing list
subsurface@hohndel.org
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to