]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
Returned value was not cleared if key didn't exist.
authorToni Wilen <twilen@winuae.net>
Sun, 31 Jan 2016 13:49:41 +0000 (15:49 +0200)
committerToni Wilen <twilen@winuae.net>
Sun, 31 Jan 2016 13:49:41 +0000 (15:49 +0200)
od-win32/registry.cpp

index a6e09e354188f002c3835b3155c398b4fdaea4b8..e578c02a932ee293f503198a453d7f0382dc4cab 100644 (file)
@@ -68,6 +68,7 @@ int regsetint (UAEREG *root, const TCHAR *name, int val)
 
 int regqueryint (UAEREG *root, const TCHAR *name, int *val)
 {
+       *val = 0;
        if (inimode) {
                int ret = 0;
                TCHAR tmp[100];
@@ -106,6 +107,7 @@ int regsetlonglong (UAEREG *root, const TCHAR *name, ULONGLONG val)
 
 int regquerylonglong (UAEREG *root, const TCHAR *name, ULONGLONG *val)
 {
+       *val = 0;
        if (inimode) {
                int ret = 0;
                TCHAR tmp[100];
@@ -125,7 +127,6 @@ int regquerylonglong (UAEREG *root, const TCHAR *name, ULONGLONG *val)
        }
 }
 
-
 int regquerystr (UAEREG *root, const TCHAR *name, TCHAR *str, int *size)
 {
        if (inimode) {