File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
branches/snap-stage3/src/libcore Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
- refs/heads/snap-stage3: 015527b0cee0bc5cfaac8dd610035a0c1b2f8ea6
4
+ refs/heads/snap-stage3: 21d56f2c68bf54e52611db486f900e93d1d2a349
5
5
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ mod ct {
94
94
}
95
95
let mut i = 0 u;
96
96
while i < lim {
97
- let curr = str:: slice ( s, i, i+1 u) ;
97
+ let size = str:: utf8_char_width ( s[ i] ) ;
98
+ let curr = str:: slice ( s, i, i+size) ;
98
99
if str:: eq ( curr, "%" ) {
99
100
i += 1 u;
100
101
if i >= lim {
@@ -110,7 +111,7 @@ mod ct {
110
111
pieces += [ rs. piece ] ;
111
112
i = rs. next ;
112
113
}
113
- } else { buf += curr; i += 1 u ; }
114
+ } else { buf += curr; i += size ; }
114
115
}
115
116
flush_buf ( buf, pieces) ;
116
117
ret pieces;
You can’t perform that action at this time.
0 commit comments