Make core library use a..<b rather than doing a..b-1

This commit is contained in:
gingerBill
2019-05-28 12:52:20 +01:00
parent 222941727f
commit fb3d73cb20
8 changed files with 40 additions and 40 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ encode :: proc(d: []u16, s: []rune) -> int {
n, m := 0, len(d);
loop: for r in s {
switch r {
case 0.._surr1-1, _surr3 .. _surr_self-1:
case 0..<_surr1, _surr3 ..< _surr_self:
if m+1 < n do break loop;
d[n] = u16(r);
n += 1;
@@ -59,7 +59,7 @@ encode_string :: proc(d: []u16, s: string) -> int {
n, m := 0, len(d);
loop: for r in s {
switch r {
case 0.._surr1-1, _surr3 .. _surr_self-1:
case 0..<_surr1, _surr3 ..< _surr_self:
if m+1 < n do break loop;
d[n] = u16(r);
n += 1;