--- rxvt-unicode/src/main.C 2006/07/05 22:46:14 1.225 +++ rxvt-unicode/src/main.C 2006/08/02 09:14:19 1.228 @@ -58,10 +58,15 @@ bool rxvt_set_locale (const char *locale) NOTHROW { - if (!locale || !strncmp (locale, curlocale, 128)) + int size = strlen (locale) + 1; + + if (size > sizeof (curlocale)) + rxvt_fatal ("locale string too long, aborting.\n"); + + if (!locale || !memcmp (locale, curlocale, size)) return false; - strncpy (curlocale, locale, 128); + memcpy (curlocale, locale, size); setlocale (LC_CTYPE, curlocale); return true; } @@ -145,7 +150,7 @@ rxvt_term::rxvt_term () : -#if TRANSPARENT +#if TRANSPARENT || ENABLE_PERL rootwin_ev (this, &rxvt_term::rootwin_cb), #endif #ifdef HAVE_SCROLLBARS @@ -328,7 +333,7 @@ #if HAVE_SCROLLBARS scrollbar_ev.stop (display); #endif -#if TRANSPARENT +#if TRANSPARENT || ENABLE_PERL rootwin_ev.stop (display); #endif incr_ev.stop (); @@ -506,6 +511,9 @@ rootwin_ev.start (display, display->root); } #endif +#if ENABLE_PERL + rootwin_ev.start (display, display->root); +#endif set_colorfgbg ();