From 12852c2e9ad0b25395d32c4ee147eb770408cf41 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 25 Sep 2002 14:52:37 +0000 Subject: * dir.c (glob_helper): must not closedir() when exception raised while globbing "**". * marshal.c (w_uclass): unused variable. * re.c (match_clone): unused. * regex.c (re_compile_pattern): get rid of implicit promotion from plain char to int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- regex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'regex.c') diff --git a/regex.c b/regex.c index 9cb4b75c93..e9617a628f 100644 --- a/regex.c +++ b/regex.c @@ -1683,9 +1683,9 @@ re_compile_pattern(pattern, size, bufp) while ((int)b[-1] > 0 && b[b[-1] - 1] == 0) b[-1]--; if (b[-1] != (1 << BYTEWIDTH) / BYTEWIDTH) - memmove(&b[b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH], + memmove(&b[(unsigned char)b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH], 2 + EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])*8); - b += b[-1] + 2 + EXTRACT_UNSIGNED(&b[b[-1]])*8; + b += b[-1] + 2 + EXTRACT_UNSIGNED(&b[(unsigned char)b[-1]])*8; break; case '(': @@ -2194,9 +2194,9 @@ re_compile_pattern(pattern, size, bufp) while ((int)b[-1] > 0 && b[b[-1] - 1] == 0) b[-1]--; if (b[-1] != (1 << BYTEWIDTH) / BYTEWIDTH) - memmove(&b[b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH], + memmove(&b[(unsigned char)b[-1]], &b[(1 << BYTEWIDTH) / BYTEWIDTH], 2 + EXTRACT_UNSIGNED(&b[(1 << BYTEWIDTH) / BYTEWIDTH])*8); - b += b[-1] + 2 + EXTRACT_UNSIGNED(&b[b[-1]])*8; + b += b[-1] + 2 + EXTRACT_UNSIGNED(&b[(unsigned char)b[-1]])*8; break; case 'w': -- cgit v1.2.3