1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

urllib: crash when converting URL to str

This commit is contained in:
Abdullah Atta 2019-11-07 00:34:33 +05:00 committed by Alexander Medvednikov
parent 7c70f3df93
commit c4e9f09f0f

View File

@ -564,7 +564,7 @@ fn parse_authority(authority string) ?ParseAuthorityRes {
host = h host = h
} }
if i < 0 { if i < 0 {
return ParseAuthorityRes{host: host} return ParseAuthorityRes{host: host, user: user}
} }
mut userinfo := authority[..i] mut userinfo := authority[..i]
if !valid_userinfo(userinfo) { if !valid_userinfo(userinfo) {