X-Git-Url: https://git.donarmstrong.com/?p=xournal.git;a=blobdiff_plain;f=src%2Fxo-file.c;fp=src%2Fxo-file.c;h=81ce1569453295f2658c307c21bfd0344b7e87dc;hp=b8d5bbb0354b1d99638da982a4a29dcd590057b7;hb=1858c4feaa24e40cea4b1b5ea39a60fb6670f33b;hpb=09edb1edf716f0ff798f0b91a0e99e2475555995 diff --git a/src/xo-file.c b/src/xo-file.c index b8d5bbb..81ce156 100644 --- a/src/xo-file.c +++ b/src/xo-file.c @@ -252,10 +252,16 @@ gboolean close_journal(void) } // sanitize a string containing floats, in case it may have , instead of . +// also replace Windows-produced 1.#J by inf void cleanup_numeric(char *s) { - while (*s!=0) { if (*s==',') *s='.'; s++; } + while (*s!=0) { + if (*s==',') *s='.'; + if (*s=='1' && s[1]=='.' && s[2]=='#' && s[3]=='J') + { *s='i'; s[1]='n'; s[2]='f'; s[3]=' '; } + s++; + } } // the XML parser functions for open_journal() @@ -650,7 +656,7 @@ void xoj_parser_text(GMarkupParseContext *context, if (ptr == text) break; text_len -= (ptr - text); text = ptr; - if (!finite(ui.cur_path.coords[n])) { + if (!finite_sized(ui.cur_path.coords[n])) { if (n>=2) ui.cur_path.coords[n] = ui.cur_path.coords[n-2]; else ui.cur_path.coords[n] = 0; }