ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/main.C
(Generate patch)

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.226 by root, Thu Jul 6 23:48:11 2006 UTC vs.
Revision 1.229 by root, Fri Aug 18 23:03:31 2006 UTC

56static char curlocale[128], savelocale[128]; 56static char curlocale[128], savelocale[128];
57 57
58bool 58bool
59rxvt_set_locale (const char *locale) NOTHROW 59rxvt_set_locale (const char *locale) NOTHROW
60{ 60{
61 int size = strlen (locale) + 1;
62
63 if (size > sizeof (curlocale))
64 rxvt_fatal ("locale string too long, aborting.\n");
65
61 if (!locale || !strncmp (locale, curlocale, 128)) 66 if (!locale || !memcmp (locale, curlocale, size))
62 return false; 67 return false;
63 68
64 strncpy (curlocale, locale, 128); 69 memcpy (curlocale, locale, size);
65 setlocale (LC_CTYPE, curlocale); 70 setlocale (LC_CTYPE, curlocale);
66 return true; 71 return true;
67} 72}
68 73
69void 74void
265 } 270 }
266 271
267 clear (); 272 clear ();
268 } 273 }
269 274
270 delete pix_colors_focused; 275 delete [] pix_colors_focused;
271#if OFF_FOCUS_FADING 276#if OFF_FOCUS_FADING
272 delete pix_colors_unfocused; 277 delete [] pix_colors_unfocused;
273#endif 278#endif
274 279
275 displays.put (display); 280 displays.put (display);
276 281
277 scr_release (); 282 scr_release ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines