Skip to content

Commit 45d22ca

Browse files
authored
Fix bug for tags that end in non-ascii chars (#116)
1 parent 8972054 commit 45d22ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Deserialization/lookahead.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ quantity, such as `old_tag = "test/struct/re"` and `new_tag = "test/struct/im"`
66
then returns true. False otherwise
77
"""
88
function tags_match_re_im(old_tag, new_tag)
9-
if old_tag[end-2:end] == "/re"
9+
if isvalid(old_tag, lastindex(old_tag)-2) && old_tag[end-2:end] == "/re"
1010
old_tag_parts = split(old_tag, "/")
1111
new_tag_parts = split(new_tag, "/")
1212
if ( all(old_tag_parts[1:end-1] .== new_tag_parts[1:end-1]) &&

0 commit comments

Comments
 (0)