From e3e605bd33fc5be56cb7ec842449718bc5337a75 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 17:46:11 -0300 Subject: A class with non-ASCII runes matches them: [éa-z] is taken as (é|[a-z]), a range up to 256 runes spelled out MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mvzr's classes hold bytes, and it refused a multibyte member as a bad expression. Rewriting the class before compiling, as ^a|^b already is, needs no mvzr patch; runes that differ only in their last byte go as one alternative (\xc3[\xa0-\xbf] for [à-ÿ]) so a 256-rune range fits the 512-operation limit, which counts the pattern as rewritten. A wider range and [^é] are refused, naming why. Co-Authored-By: Claude Opus 5.5 --- src/ninep/addr.zig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ninep') diff --git a/src/ninep/addr.zig b/src/ninep/addr.zig index 005ad593..33a3f646 100644 --- a/src/ninep/addr.zig +++ b/src/ninep/addr.zig @@ -302,6 +302,8 @@ pub const Addr = struct { a.err = switch (err) { error.Anchor => regexp_.Regex.e_anchor, error.TooLong => regexp_.Regex.e_long, + error.WideRange => regexp_.Regex.e_wide, + error.NegatedRunes => regexp_.Regex.e_negated, error.Bad => e_regexp, }; return null; -- cgit v1.3