aboutsummaryrefslogtreecommitdiff
path: root/loader/loader.c
diff options
context:
space:
mode:
authorPiers Daniell <pdaniell@nvidia.com>2015-11-05 16:58:26 -0700
committerJon Ashburn <jon@lunarg.com>2015-11-08 20:58:51 -0700
commit7e825911e286b91e9b715bb530ebd53d551a8a04 (patch)
tree8fb0aa2b66bb6e06ff0f2f64537e695bb7e70d73 /loader/loader.c
parentd864f2aec587ca212ad122d3b84037056460ef72 (diff)
downloadusermoji-7e825911e286b91e9b715bb530ebd53d551a8a04.tar.xz
Reset the "access_flags" for each loop iteration
Without out this fix the access_flags will have KEY_WOW64_32KEY set for all iterations except the first one.
Diffstat (limited to 'loader/loader.c')
-rw-r--r--loader/loader.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/loader/loader.c b/loader/loader.c
index 459f0e10..4f910111 100644
--- a/loader/loader.c
+++ b/loader/loader.c
@@ -221,7 +221,7 @@ static char *loader_get_registry_files(const struct loader_instance *inst, char
{
LONG rtn_value;
HKEY hive, key;
- DWORD access_flags = KEY_QUERY_VALUE;
+ DWORD access_flags;
char name[2048];
char *out = NULL;
char *loc = location;
@@ -236,6 +236,7 @@ static char *loader_get_registry_files(const struct loader_instance *inst, char
{
next = loader_get_next_path(loc);
hive = DEFAULT_VK_REGISTRY_HIVE;
+ access_flags = KEY_QUERY_VALUE;
rtn_value = RegOpenKeyEx(hive, loc, 0, access_flags, &key);
if (rtn_value != ERROR_SUCCESS) {
// We didn't find the key. Try the 32-bit hive (where we've seen the