Module: wine Branch: master Commit: b4fb0aef0d21e10b3e776f43be69e1c52a798f90 URL: https://gitlab.winehq.org/wine/wine/-/commit/b4fb0aef0d21e10b3e776f43be69e1c...
Author: Piotr Caban piotr@codeweavers.com Date: Tue Aug 1 15:53:54 2023 +0200
winedump: Support REG_MULTI_SZ values in regf files.
---
tools/winedump/reg.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/tools/winedump/reg.c b/tools/winedump/reg.c index 65426f540c0..2afde27e2d7 100644 --- a/tools/winedump/reg.c +++ b/tools/winedump/reg.c @@ -194,8 +194,8 @@ static BOOL dump_value(unsigned int hive_off, unsigned int off) { unsigned int i, len, data_size; const void *data = NULL; + const char *name, *str; const value_key *val; - const char *name;
val = PRD(hive_off + off, sizeof(*val)); if (!val || memcmp(&val->signature, "vk", 2)) @@ -269,6 +269,22 @@ static BOOL dump_value(unsigned int hive_off, unsigned int off) assert(data_size == sizeof(DWORD)); printf("dword:%08x", *(unsigned int *)data); break; + case REG_MULTI_SZ: + printf("str(7):""); + + while(data_size > sizeof(WCHAR)) + { + for (len = 0; len < data_size / sizeof(WCHAR); len++) + if (!((WCHAR *)data)[len]) + break; + str = get_unicode_str(data, len); + + printf("%.*s\0", (unsigned int)strlen(str + 1) - 1, str + 1); + data = ((WCHAR *)data) + len + 1; + data_size -= (len + 1) * sizeof(WCHAR); + } + printf("""); + break; default: printf("unhandled data type %d", val->data_type); }