summaryrefslogtreecommitdiff
path: root/src/w32-reg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32-reg.c')
-rw-r--r--src/w32-reg.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/w32-reg.c b/src/w32-reg.c
index 5510df8..b1134a5 100644
--- a/src/w32-reg.c
+++ b/src/w32-reg.c
@@ -145,6 +145,21 @@ _gpgrt_w32_reg_query_string (const char *root, const char *dir,
xfree (tmp);
}
}
+ else if (type == REG_DWORD && nbytes == sizeof (DWORD))
+ {
+ char *tmp;
+ DWORD dummy;
+
+ memcpy (&dummy, result, nbytes);
+ tmp = _gpgrt_estream_bsprintf ("%u", (unsigned int)dummy);
+ if (tmp)
+ {
+ xfree (result);
+ result = tmp;
+ }
+ else
+ _gpgrt_log_info ("warning: malloc failed while reading registry key\n");
+ }
leave:
RegCloseKey (key_handle);