-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enums bugs #139
Comments
Stumbled upon this also. Reading the webide code gave me come clues what us going on. As i understand this flags behavior is webide specific and is not part of generated code? can't find anything about it in the guide. kaitai_struct_webide/src/v1/kaitaiWorker.ts Lines 56 to 68 in a2496ac
|
Yes, this is a misfeature of the Web IDE that doesn't respect how KS enums work. Currently, KS enums are strictly one-to-one bi-directional mappings between integer constants and identifiers (one integer value can be assigned to at most one identifier and one identifier can't be used more than once). The presence of an enum member is always based on equality - so an integer converted to an enum type matches at most one member in the enum. |
@generalmimon Good to know. It confused me a bit as my case it only showed one enum name (no "|") so thought i had missed something how enums work. |
so i use https://ide.kaitai.io/
and use this file
samples/sample1.zip
and this my code
and this my resualts
frametype = FIXED|VARIABLE (0x50 = 80)
how that its worng
The text was updated successfully, but these errors were encountered: