summaryrefslogtreecommitdiff
path: root/src/ninep
diff options
context:
space:
mode:
Diffstat (limited to 'src/ninep')
-rw-r--r--src/ninep/addr.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ninep/addr.zig b/src/ninep/addr.zig
index f60c07b1..c052a665 100644
--- a/src/ninep/addr.zig
+++ b/src/ninep/addr.zig
@@ -299,7 +299,11 @@ pub const Addr = struct {
return null;
}
var rx = regexp_.Regex.compile(pat) catch |err| {
- a.err = if (err == error.Anchor) regexp_.Regex.e_anchor else e_regexp;
+ a.err = switch (err) {
+ error.Anchor => regexp_.Regex.e_anchor,
+ error.TooLong => regexp_.Regex.e_long,
+ error.Bad => e_regexp,
+ };
return null;
};
// sam's nextmatch (editors/sam/address.c:97-119): an empty match