From dd28fe6e82cca59ad5104275ffbbfa2e7d5fd33a Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 3 Jan 2019 00:12:24 +0000 Subject: [PATCH] Update CEL --- core/encoding/cel/cel.odin | 2 +- src/types.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/encoding/cel/cel.odin b/core/encoding/cel/cel.odin index 7d59cd386..3f7362203 100644 --- a/core/encoding/cel/cel.odin +++ b/core/encoding/cel/cel.odin @@ -205,7 +205,7 @@ unquote_char :: proc(s: string, quote: byte) -> (r: rune, multiple_bytes: bool, if s[0] == quote && quote == '"' { return; } else if s[0] >= 0x80 { - r, w := utf8.decode_rune_from_string(s); + r, w := utf8.decode_rune_in_string(s); return r, true, s[w:], true; } else if s[0] != '\\' { return rune(s[0]), false, s[1:], true; diff --git a/src/types.cpp b/src/types.cpp index e6010b1e5..cd610d3cb 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -1338,6 +1338,9 @@ bool is_type_polymorphic(Type *t, bool or_specialized=false) { break; case Type_Map: + if (t->Map.key == nullptr || t->Map.value == nullptr) { + return false; + } if (is_type_polymorphic(t->Map.key, or_specialized)) { return true; }