From 81db1ee99ebafd625e45b67c425586f900e78b95 Mon Sep 17 00:00:00 2001 From: Elijah Date: Fri, 31 May 2024 13:59:45 -0400 Subject: [PATCH] small fixes --- MSNRedirector/dllmain.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MSNRedirector/dllmain.cpp b/MSNRedirector/dllmain.cpp index d8cde63..bcdb923 100644 --- a/MSNRedirector/dllmain.cpp +++ b/MSNRedirector/dllmain.cpp @@ -67,6 +67,7 @@ VOID LoadURL() { if (status == ERROR_FILE_NOT_FOUND) { SetFallbackService(); RegSetValueExA(key, "Server", 0, REG_SZ, (byte*)MESSENGERSERVICE, strlen(MESSENGERSERVICE)); + RegCloseKey(key); return; } if (status != ERROR_SUCCESS) { @@ -85,7 +86,7 @@ VOID LoadURL() { } // Read key byte* data = (byte*)malloc(size); - status = RegQueryValueExA(key, "SERVER", NULL, NULL, data, &size); + status = RegQueryValueExA(key, "Server", NULL, NULL, data, &size); if (status != ERROR_SUCCESS) { char c[128]; sprintf_s(c, "Reading MSNRedirector Server from registry failed with system error %d\nFalling back to default", status);