summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-04-28 20:11:20 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-04-28 20:11:20 +0000
commit1c94caf4a2d926d09d8fc04aa926eefd20ba5ed7 (patch)
tree9aeabb8605d20721ea50e76e66c2aa8cfe67fe81 /win32
parent2b1c7e3efefd8eb7f363204cf8864d0ba215a2d0 (diff)
downloadperl-1c94caf4a2d926d09d8fc04aa926eefd20ba5ed7.tar.gz
allow REG_EXPAND_SZ keys in Windows registry (from
John Clayton <John.Clayton@barclayscapital.com>) p4raw-id: //depot/perl@6003
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 840274beab..e10b1155f8 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -177,7 +177,9 @@ get_regstr_from(HKEY hkey, const char *valuename, SV **svp)
if (retval == ERROR_SUCCESS) {
DWORD datalen;
retval = RegQueryValueEx(handle, valuename, 0, &type, NULL, &datalen);
- if (retval == ERROR_SUCCESS && type == REG_SZ) {
+ if (retval == ERROR_SUCCESS
+ && (type == REG_SZ || type == REG_EXPAND_SZ))
+ {
dTHXo;
if (!*svp)
*svp = sv_2mortal(newSVpvn("",0));