small fixes

This commit is contained in:
Elijah 2024-05-31 13:59:45 -04:00
parent c9f2f0da19
commit 81db1ee99e

View file

@ -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);