Fix string_to_enum_value

This commit is contained in:
Ginger Bill
2017-10-09 22:56:48 +01:00
parent b772ad7094
commit 065d0e4ee3
+1 -1
View File
@@ -698,7 +698,7 @@ enum_value_to_string :: proc(v: any) -> (string, bool) {
string_to_enum_value :: proc(T: type, s: string) -> (T, bool) {
ti := type_info_base(type_info_of(T));
if e, ok := ti.variant.(Type_Info.Enum); ok {
if e, ok := ti.variant.(Type_Info_Enum); ok {
for str, idx in e.names {
if s == str {
// NOTE(bill): Unsafe cast