From: Dom Lachowicz (domlachowicz@yahoo.com)
Date: Mon Sep 01 2003 - 10:28:20 EDT
Committed.
Dom
--- Marc Maurer <j.m.maurer@student.utwente.nl> wrote:
> This patch prevent weird things from happening when
> users set there
> locale to some a 1 or 0 length string. Since it's
> essentially dom's own
> patch, it would be kinda funny if it was rejected
> :-P
>
> Marc
>
>
>
> --
> Marc Maurer <j.m.maurer@student.utwente.nl>
> > Index: ap_UnixPrefs.cpp
>
===================================================================
> RCS file:
> /cvsroot/abi/src/wp/ap/unix/ap_UnixPrefs.cpp,v
> retrieving revision 1.20
> diff -u -r1.20 ap_UnixPrefs.cpp
> --- ap_UnixPrefs.cpp 28 Aug 2003 21:00:30 -0000 1.20
> +++ ap_UnixPrefs.cpp 1 Sep 2003 13:54:39 -0000
> @@ -104,8 +104,9 @@
> // we'll try this quick conversion
> if (lc_ctype != NULL && strlen(lc_ctype) >= 5)
> {
> - if (lc_ctype[2] == '_')
> - lc_ctype[2] = '-';
> + char * uscore = strchr(lc_ctype, '_');
> + if (uscore)
> + *uscore = '-';
>
> char* modifier = strrchr(lc_ctype,'@');
> /*
>
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
This archive was generated by hypermail 2.1.4 : Mon Sep 01 2003 - 10:40:39 EDT