summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regex.c6
-rw-r--r--string.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/regex.c b/regex.c
index 23443b9..2eefc9d 100644
--- a/regex.c
+++ b/regex.c
@@ -1059,6 +1059,7 @@ re_compile_pattern(pattern, size, bufp)
int options = bufp->options;
bufp->fastmap_accurate = 0;
+ bufp->must = 0;
/* Initialize the syntax table. */
init_syntax_once();
@@ -2222,8 +2223,7 @@ must_instr(little, llen, big, blen, translate)
c = *little;
if (c == 0xff) {
- c = *++little;
- llen--;
+ c = little[1];
fescape = 1;
}
else if (translate && !ismbchar(c)) {
@@ -4199,7 +4199,7 @@ static const unsigned char mbctab_euc[] = { /* 0xA1-0xFE */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
diff --git a/string.c b/string.c
index d85a9df..f379f02 100644
--- a/string.c
+++ b/string.c
@@ -1466,7 +1466,7 @@ str_inspect(str)
else {
CHECK(4);
*b++ = '\\';
- sprintf(b, "%03o", c);
+ sprintf(b, "%03o", c & 0377);
b += 3;
}
}