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

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.540 by sf-exg, Sat Apr 20 19:50:04 2013 UTC vs.
Revision 1.541 by root, Thu Feb 20 18:59:13 2014 UTC

3227rxvt_term::get_to_st (unicode_t &ends_how) 3227rxvt_term::get_to_st (unicode_t &ends_how)
3228{ 3228{
3229 unicode_t ch; 3229 unicode_t ch;
3230 bool seen_esc = false; 3230 bool seen_esc = false;
3231 unsigned int n = 0; 3231 unsigned int n = 0;
3232 wchar_t string[STRING_MAX]; 3232 wchar_t string[CBUFSIZ];
3233 3233
3234 while ((ch = cmd_getc ()) != NOCHAR) 3234 while ((ch = cmd_getc ()) != NOCHAR)
3235 { 3235 {
3236 if (seen_esc) 3236 if (seen_esc)
3237 { 3237 {
3252 else if (ch < 0x20) 3252 else if (ch < 0x20)
3253 return NULL; /* other control character - exit */ 3253 return NULL; /* other control character - exit */
3254 3254
3255 seen_esc = false; 3255 seen_esc = false;
3256 3256
3257 if (n >= STRING_MAX - 1) 3257 if (n >= sizeof (string) - 1)
3258 // stop at some sane length 3258 // stop at some sane length
3259 return NULL; 3259 return NULL;
3260 3260
3261 string[n++] = ch; 3261 string[n++] = ch;
3262 } 3262 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines