mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-15 02:12:22 -07:00
Fix #4530
This commit is contained in:
+5
-1
@@ -370,7 +370,11 @@ gb_internal ExactValue exact_value_from_basic_literal(TokenKind kind, String con
|
||||
}
|
||||
case Token_Rune: {
|
||||
Rune r = GB_RUNE_INVALID;
|
||||
utf8_decode(string.text, string.len, &r);
|
||||
if (string.len == 1) {
|
||||
r = cast(Rune)string.text[0];
|
||||
} else {
|
||||
utf8_decode(string.text, string.len, &r);
|
||||
}
|
||||
return exact_value_i64(r);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user