mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
base64: fix warnings
This commit is contained in:
parent
b7663848ef
commit
f87177d34d
@ -128,9 +128,9 @@ pub fn encode_in_buffer(data &string, buffer byteptr) int {
|
|||||||
mut b := &byte(0)
|
mut b := &byte(0)
|
||||||
mut etable := &byte(0)
|
mut etable := &byte(0)
|
||||||
unsafe{
|
unsafe{
|
||||||
d = &byte(data.str)
|
d = data.str
|
||||||
b = &byte(buffer)
|
b = buffer
|
||||||
etable = &byte(EncodingTable.str)
|
etable = EncodingTable.str
|
||||||
}
|
}
|
||||||
|
|
||||||
for i < input_length {
|
for i < input_length {
|
||||||
@ -151,7 +151,7 @@ pub fn encode_in_buffer(data &string, buffer byteptr) int {
|
|||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
|
|
||||||
triple := ((int(octet_a) << 0x10) + (int(octet_b) << 0x08) + int(octet_c))
|
triple := ((octet_a << 0x10) + (octet_b << 0x08) + octet_c)
|
||||||
|
|
||||||
b[j] = etable[ (triple >> 3 * 6) & 63 ] // 63 is 0x3F
|
b[j] = etable[ (triple >> 3 * 6) & 63 ] // 63 is 0x3F
|
||||||
b[j+1] = etable[ (triple >> 2 * 6) & 63 ]
|
b[j+1] = etable[ (triple >> 2 * 6) & 63 ]
|
||||||
|
Loading…
Reference in New Issue
Block a user