From: Jody Goldberg (jody_at_gnome.org)
Date: Sun Jan 11 2004 - 12:06:13 EST
On Sun, Jan 11, 2004 at 09:00:12AM -0800, Dom Lachowicz wrote:
> Hub broke the build. This now fixes it.
>
> PLEASE REMEMBER TO USE SETLOCALE!!
>
> I saw 2 places in platform-specific code where we
> don't use setlocale(LC_NUMERIC, "C"), but are
> printf'ing a float.
> char * locale = setlocale(LC_NUMERIC, "C");
> UT_UTF8String
> szThickness(UT_UTF8String_sprintf("%fin",thickness));
> setlocale(LC_NUMERIC, locale);
You do not want to do that. The string returned by setlocale is not
guaranteed to live on. The only safe thing to do is to strdup it.
This archive was generated by hypermail 2.1.4 : Sun Jan 11 2004 - 12:06:12 EST