mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 02:02:42 +02:00
commit bash-20150515 snapshot
This commit is contained in:
+1
-1
@@ -1859,7 +1859,7 @@ sv_isrchterm (value)
|
||||
}
|
||||
else
|
||||
{
|
||||
for (beg = end = 0; whitespace (v[end]) == 0; end++)
|
||||
for (beg = end = 0; v[end] && whitespace (v[end]) == 0; end++)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@@ -246,6 +246,13 @@ sh_backslash_quote (string, table, flags)
|
||||
for (r = result, s = string; s && (c = *s); s++)
|
||||
{
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
/* XXX - isascii, even if is_basic(c) == 0 - works in most cases. */
|
||||
if (c >= 0 && c <= 127 && backslash_table[(unsigned char)c] == 1)
|
||||
{
|
||||
*r++ = '\\';
|
||||
*r++ = c;
|
||||
continue;
|
||||
}
|
||||
if (MB_CUR_MAX > 1 && is_basic (c) == 0)
|
||||
{
|
||||
COPY_CHAR_P (r, s, send);
|
||||
|
||||
+3
-2
@@ -312,8 +312,9 @@ ansic_wshouldquote (string)
|
||||
|
||||
slen = mbstowcs (wcstr, string, 0);
|
||||
|
||||
if (slen == -1)
|
||||
slen = 0;
|
||||
if (slen == (size_t)-1)
|
||||
return 1;
|
||||
|
||||
wcstr = (wchar_t *)xmalloc (sizeof (wchar_t) * (slen + 1));
|
||||
mbstowcs (wcstr, string, slen + 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user