1
0
Fork 0
forked from fte/fteqw

fix autoupdate. hopefully for the last time...

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4827 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2015-01-09 08:24:58 +00:00
parent 7431c398d8
commit 172532ba6d

View file

@ -2536,13 +2536,13 @@ qboolean MyRegGetStringValue(HKEY base, char *keyname, char *valuename, void *da
DWORD type = REG_NONE;
if (RegOpenKeyEx(base, keyname, 0, KEY_READ, &subkey) == ERROR_SUCCESS)
{
DWORD dwlen;
DWORD dwlen = datalen;
result = ERROR_SUCCESS == RegQueryValueEx(subkey, valuename, NULL, &type, data, &dwlen);
datalen = dwlen;
RegCloseKey (subkey);
}
if (type == REG_SZ || type == REG_EXPAND_SZ)
if (result && (type == REG_SZ || type == REG_EXPAND_SZ))
((char*)data)[datalen] = 0;
else
((char*)data)[0] = 0;
@ -2555,7 +2555,7 @@ qboolean MyRegGetStringValueMultiSz(HKEY base, char *keyname, char *valuename, v
DWORD type = REG_NONE;
if (RegOpenKeyEx(base, keyname, 0, KEY_READ, &subkey) == ERROR_SUCCESS)
{
DWORD dwlen;
DWORD dwlen = datalen;
result = ERROR_SUCCESS == RegQueryValueEx(subkey, valuename, NULL, &type, data, &dwlen);
datalen = dwlen;
RegCloseKey (subkey);