diff --git a/src/pc.c b/src/pc.c index bf8036f52..86eb6e364 100644 --- a/src/pc.c +++ b/src/pc.c @@ -926,9 +926,9 @@ void loadconfig(wchar_t *fn) } memset(nvr_path, 0, 2048); - wp = (wchar_t *)config_get_wstring(NULL, "nvr_path", L"nvr"); + wp = (wchar_t *)config_get_wstring(NULL, "nvr_path", L""); if (wp) { - if (wcslen(wp) <= 992) wcscpy(nvr_path, wp); + if (wcslen(wp) && (wcslen(wp) <= 992)) wcscpy(nvr_path, wp); else { append_filename_w(nvr_path, pcempath, L"nvr", 511); diff --git a/src/win.c b/src/win.c index 9b85ac8ca..e601e2fb6 100644 --- a/src/win.c +++ b/src/win.c @@ -1851,6 +1851,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM { config_save(config_file_default); loadconfig(wopenfilestring); + pclog_w(L"NVR path: %s\n", nvr_path); mem_resize(); loadbios(); resetpchard();