Skip to content

Commit

Permalink
wmic: Treat VT_I4 values as unsigned.
Browse files Browse the repository at this point in the history
Many properties are exported as VT_I4 even though the underlying type is CIM_UINT32.
  • Loading branch information
Hans Leidekker authored and julliard committed Mar 3, 2025
1 parent d511872 commit 6e2b81a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions programs/wmic/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ static void convert_to_bstr( VARIANT *v )
BSTR out = NULL;
VARTYPE vt;

/* treat VT_I4 values as unsigned */
if (V_VT(v) == VT_I4) V_VT(v) = VT_UI4;

if (SUCCEEDED(VariantChangeType( v, v, 0, VT_BSTR ))) return;
vt = V_VT(v);
if (vt == (VT_ARRAY | VT_BSTR))
Expand Down

0 comments on commit 6e2b81a

Please sign in to comment.