winedump: Fix REG_DWORD dumping with no data.

This commit is contained in:
Piotr Caban 2024-03-21 16:18:27 +01:00 committed by Alexandre Julliard
parent 753875e80b
commit d7aaf51459

View file

@ -279,8 +279,11 @@ static BOOL dump_value(unsigned int hive_off, unsigned int off)
}
break;
case REG_DWORD:
assert(data_size == sizeof(DWORD));
printf("dword:%08x", *(unsigned int *)data);
assert(data_size == sizeof(DWORD) || !data_size);
if (data_size)
printf("dword:%08x", *(unsigned int *)data);
else
printf("hex(4):");
break;
case REG_MULTI_SZ:
printf("str(7):\"");