Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | Author: Jean-Luc Leger <reiga@dspnet.fr.eu.org> |
| 2 | Description: fix broken globbing expansion |
| 3 | Debian-Bug: #603545 |
| 4 | Index: tcsh-6.18.01/tc.str.c |
| 5 | =================================================================== |
| 6 | --- tcsh-6.18.01.orig/tc.str.c 2012-01-10 13:34:31.000000000 -0800 |
| 7 | +++ tcsh-6.18.01/tc.str.c 2013-02-26 13:12:13.429153489 -0800 |
| 8 | @@ -122,8 +122,9 @@ |
| 9 | #else |
| 10 | ret = mbtowc(&tmp, s, n); |
| 11 | #endif |
| 12 | - if (ret > 0) { |
| 13 | + if (ret >= 0) |
| 14 | *pwc = tmp; |
| 15 | + if (ret >= 0) { |
| 16 | #if defined(UTF16_STRINGS) && defined(HAVE_MBRTOWC) |
| 17 | if (tmp >= 0xd800 && tmp <= 0xdbff) { |
| 18 | /* UTF-16 surrogate pair. Fetch second half and compute |