Closed diversenok closed 1 month ago
This pull request fixes a bug in reconstructing some values in enumerations. The switch-case branch that prints unsigned two-byte (VT_UI2) values used to misinterpret them as signed and, thus, sing-extending them before printing.
VT_UI2
Here is an example of an incorrect output:
enum tagCLSCTX { // -- truncated -- CLSCTX_RESERVED5 = 2048, CLSCTX_NO_CUSTOM_MARSHAL = 4096, CLSCTX_ENABLE_CODE_DOWNLOAD = 8192, CLSCTX_NO_FAILURE_LOG = 16384, CLSCTX_DISABLE_AAA = 0xffff8000, // <--- should be 0x8000 instead CLSCTX_ENABLE_AAA = 0x10000, CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000, // -- truncated -- };
The PR adjusts the code to access the correct variant fields.
This pull request fixes a bug in reconstructing some values in enumerations. The switch-case branch that prints unsigned two-byte (
VT_UI2
) values used to misinterpret them as signed and, thus, sing-extending them before printing.Here is an example of an incorrect output:
The PR adjusts the code to access the correct variant fields.