Hello Dia developers,

I just found a bug in dia: In dia_xml.c strtod is used without checking of
the locale settings, this causes dia to fail when opening a file with
german language in which a point like 5,4 appears (It is interpreted from
strtod as 5.4). Fix for dia_xml.c is attached.

BTW: I didn't found a place to submit this in the Bug tracking system. Is
there one?

        Matze

PS: Please answer me direct. I'm not a member of the list

18d17
< #include <glib.h>
22a22
> #include <glib.h>
24,27c24
< #include <parser.h>
< #if defined(LIBXML_VERSION) && LIBXML_VERSION >= 20000
< #define childs children
< #endif
---
> #include <tree.h>
175a173
>   char *old_locale;
181a180
>   old_locale = setlocale(LC_NUMERIC, "C");
185a185
>   setlocale(LC_NUMERIC, old_locale);
256a257
>   char *old_locale;
262a264,265
>   old_locale = setlocale(LC_NUMERIC, "C");
> 
264c267
<   point->x = g_strtod(val, &str);
---
>   point->x = strtod(val, &str);
270a274
>     setlocale(LC_NUMERIC, old_locale);
274a279
>   setlocale(LC_NUMERIC, old_locale);
282a288
>   char *old_locale;
288a295
>   old_locale = setlocale(LC_NUMERIC, "C");
298a306
>     setlocale(LC_NUMERIC, old_locale);
309a318
>     setlocale(LC_NUMERIC, old_locale);
320a330
>     setlocale(LC_NUMERIC, old_locale);
325a336
>   setlocale(LC_NUMERIC, old_locale);

Reply via email to