mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
net.urllib: make unescape() autofree compatible (#11510)
This commit is contained in:
@ -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', ''))
|
||||||
|
Reference in New Issue
Block a user