Skip to content

Commit

Permalink
Fix bug for tags that end in non-ascii chars (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
JobJob authored Feb 13, 2023
1 parent 8972054 commit 45d22ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Deserialization/lookahead.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ quantity, such as `old_tag = "test/struct/re"` and `new_tag = "test/struct/im"`
then returns true. False otherwise
"""
function tags_match_re_im(old_tag, new_tag)
if old_tag[end-2:end] == "/re"
if isvalid(old_tag, lastindex(old_tag)-2) && old_tag[end-2:end] == "/re"
old_tag_parts = split(old_tag, "/")
new_tag_parts = split(new_tag, "/")
if ( all(old_tag_parts[1:end-1] .== new_tag_parts[1:end-1]) &&
Expand Down

0 comments on commit 45d22ca

Please sign in to comment.