diff options
author | Jay Hobson <jay.hobson@sun.com> | 2001-08-08 13:38:33 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@sun.com> | 2007-08-10 14:39:55 -0700 |
commit | 4f7bc8ecad63db6b7557b5556ac6f604e84eb55e (patch) | |
tree | 5168029f9884a20c291d45784bacd6812f4da9ad | |
parent | 23e375f3842b433b0af7f150135537f7381208ae (diff) |
Sun Bug 4474581: xprop fails in Japanese locale
CJK locales need a much longer string as they include
many \xXX entries which expand into /XXXXXXXX entries.
Increased the buffer from 10000 to 500000 bytes.
Make sure buffer pointer doesn't go negative in _put_char.
-rw-r--r-- | xprop.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -55,7 +55,7 @@ from The Open Group. #include "dsimple.h" -#define MAXSTR 10000 +#define MAXSTR 500000 #define MAXELEMENTS 64 #ifndef min @@ -671,11 +671,12 @@ static int _buf_len; static void _put_char (char c) { - if (--_buf_len < 0) { + if (_buf_len <= 0) { _buf_ptr[0] = '\0'; return; } _buf_ptr++[0] = c; + _buf_len--; } static void |