Skip to content

Commit 5c50e11

Browse files
committed
---
yaml --- r: 10550 b: refs/heads/snap-stage3 c: 21d56f2 h: refs/heads/master v: v3
1 parent 6b1b597 commit 5c50e11

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
refs/heads/master: 2898dcc5d97da9427ac367542382b6239d9c0bbf
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 015527b0cee0bc5cfaac8dd610035a0c1b2f8ea6
4+
refs/heads/snap-stage3: 21d56f2c68bf54e52611db486f900e93d1d2a349
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/snap-stage3/src/libcore/extfmt.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ mod ct {
9494
}
9595
let mut i = 0u;
9696
while i < lim {
97-
let curr = str::slice(s, i, i+1u);
97+
let size = str::utf8_char_width(s[i]);
98+
let curr = str::slice(s, i, i+size);
9899
if str::eq(curr, "%") {
99100
i += 1u;
100101
if i >= lim {
@@ -110,7 +111,7 @@ mod ct {
110111
pieces += [rs.piece];
111112
i = rs.next;
112113
}
113-
} else { buf += curr; i += 1u; }
114+
} else { buf += curr; i += size; }
114115
}
115116
flush_buf(buf, pieces);
116117
ret pieces;

0 commit comments

Comments
 (0)