File tree 2 files changed +5
-3
lines changed 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,7 @@ func runetochar(str []byte, r rune) int {
178
178
* 0080-07FF => t2 tx
179
179
*/
180
180
if c <= rune2 {
181
+ _ = str [1 ]
181
182
str [0 ] = byte (t2 | (c >> (1 * bitx )))
182
183
str [1 ] = byte (tx | (c & maskx ))
183
184
return 2
@@ -201,6 +202,7 @@ func runetochar(str []byte, r rune) int {
201
202
* 0800-FFFF => t3 tx tx
202
203
*/
203
204
if c <= rune3 {
205
+ _ = str [2 ]
204
206
str [0 ] = byte (t3 | (c >> (2 * bitx )))
205
207
str [1 ] = byte (tx | ((c >> (1 * bitx )) & maskx ))
206
208
str [2 ] = byte (tx | (c & maskx ))
@@ -211,6 +213,7 @@ func runetochar(str []byte, r rune) int {
211
213
* four character sequence (21-bit value)
212
214
* 10000-1FFFFF => t4 tx tx tx
213
215
*/
216
+ _ = str [3 ]
214
217
str [0 ] = byte (t4 | (c >> (3 * bitx )))
215
218
str [1 ] = byte (tx | ((c >> (2 * bitx )) & maskx ))
216
219
str [2 ] = byte (tx | ((c >> (1 * bitx )) & maskx ))
Original file line number Diff line number Diff line change @@ -47,10 +47,9 @@ func concatstrings(buf *tmpBuf, a []string) string {
47
47
return a [idx ]
48
48
}
49
49
s , b := rawstringtmp (buf , l )
50
- l = 0
51
50
for _ , x := range a {
52
- copy (b [ l :] , x )
53
- l += len (x )
51
+ copy (b , x )
52
+ b = b [ len (x ):]
54
53
}
55
54
return s
56
55
}
You can’t perform that action at this time.
0 commit comments