net.urllib: make unescape() autofree compatible ()

pull/11518/head
Dialga 2021-09-16 16:09:20 +12:00 committed by GitHub
parent d5e00b0920
commit f295469fac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
vlib/net/urllib

View File

@ -212,7 +212,7 @@ fn unescape(s_ string, mode EncodingMode) ?string {
} }
} }
if n == 0 && !has_plus { if n == 0 && !has_plus {
return s return '$s' // TODO `return s` once an autofree bug is fixed
} }
if s.len < 2 * n { if s.len < 2 * n {
return error(error_msg('unescape: invalid escape sequence', '')) return error(error_msg('unescape: invalid escape sequence', ''))