Fix:core:Fixed trac bug #160
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 29 Jun 2008 16:57:19 +0000 (16:57 +0000)
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Sun, 29 Jun 2008 16:57:19 +0000 (16:57 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1177 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/navit.c

index a6168ae..951a724 100644 (file)
@@ -544,8 +544,11 @@ navit_append_coord(struct navit *this_, char *file, struct pcoord *c, char *type
                offset=ftell(f);
                if (c) {
                        prostr = projection_to_name(c->pro);
-                       fprintf(f,"%s%s0x%x 0x%x type=%s label=\"%s\"\n",
-                                prostr, *prostr ? ":" : "", c->x, c->y, type, description);
+                       fprintf(f,"%s%s%s0x%x %s0x%x type=%s label=\"%s\"\n",
+                                prostr, *prostr ? ":" : "", 
+                                c->x >= 0 ? "":"-", c->x >= 0 ? c->x : -c->x, 
+                                c->y >= 0 ? "":"-", c->y >= 0 ? c->y : -c->y, 
+                                type, description);
                } else
                        fprintf(f,"\n");
                fclose(f);