mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
small fix
This commit is contained in:
parent
af250fcf81
commit
c5c70f298d
1 changed files with 2 additions and 2 deletions
|
@ -896,9 +896,9 @@ fn (mut decoder Decoder) decode_enum[T](mut val T) ! {
|
||||||
|
|
||||||
if enum_info.value_kind == .number {
|
if enum_info.value_kind == .number {
|
||||||
mut result := 0
|
mut result := 0
|
||||||
decoder.decode_number(&result)!
|
unsafe { decoder.decode_number(&result)! }
|
||||||
|
|
||||||
$for value in val.values {
|
$for value in T.values {
|
||||||
if int(value.value) == result {
|
if int(value.value) == result {
|
||||||
val = value.value
|
val = value.value
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue