about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
Diffstat (limited to 'posix')
-rw-r--r--posix/regex_internal.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/posix/regex_internal.h b/posix/regex_internal.h
index f905d2b510..0092b25c13 100644
--- a/posix/regex_internal.h
+++ b/posix/regex_internal.h
@@ -379,9 +379,9 @@ static unsigned int re_string_context_at (const re_string_t *input, int idx,
 #define re_string_fetch_byte_case(pstr) \
   ((pstr)->mbs_case[(pstr)->cur_idx++])
 #define re_string_first_byte(pstr, idx) \
-  ((idx) == (pstr)->len || (pstr)->wcs[idx] != WEOF)
+  ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF)
 #define re_string_is_single_byte_char(pstr, idx) \
-  ((pstr)->wcs[idx] != WEOF && ((pstr)->len == (idx) \
+  ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) \
 				|| (pstr)->wcs[(idx) + 1] != WEOF))
 #define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx)
 #define re_string_cur_idx(pstr) ((pstr)->cur_idx)