From 0977ac111a48283ac9784ad9ebb3f18f9db6fd74 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 27 Oct 2019 08:34:20 +0000 Subject: [PATCH] Fix typo in `package utf8`; add `wchar_t` to `package c` --- core/c/c.odin | 2 ++ core/unicode/utf8/utf8.odin | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/core/c/c.odin b/core/c/c.odin index 47af84165..3ed49c0c2 100644 --- a/core/c/c.odin +++ b/core/c/c.odin @@ -31,3 +31,5 @@ ssize_t :: b.int; ptrdiff_t :: b.int; uintptr_t :: b.uintptr; intptr_t :: b.int; + +wchar_t :: (ODIN_OS == "windows") ? b.u16 : b.u32; diff --git a/core/unicode/utf8/utf8.odin b/core/unicode/utf8/utf8.odin index acdd887f0..c30f7b733 100644 --- a/core/unicode/utf8/utf8.odin +++ b/core/unicode/utf8/utf8.odin @@ -167,7 +167,7 @@ rune_at_pos :: proc(s: string, pos: int) -> rune { } i := 0; - for c in s { + for r in s { if i == pos { return r; }