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

urllib: fix string length in escape()

This commit is contained in:
sh0f 2019-11-27 17:15:05 +08:00 committed by Alexander Medvednikov
parent 584786d87c
commit dbaa37ea46

View File

@ -277,7 +277,7 @@ fn escape(s string, mode EncodingMode) string {
t[i] = `+` t[i] = `+`
} }
} }
return string(t) return string(t, t.len)
} }
upperhex := '0123456789ABCDEF' upperhex := '0123456789ABCDEF'
@ -297,7 +297,7 @@ fn escape(s string, mode EncodingMode) string {
j++ j++
} }
} }
return string(t) return string(t, t.len)
} }
// A URL represents a parsed URL (technically, a URI reference). // A URL represents a parsed URL (technically, a URI reference).