mirror of
https://github.com/reactos/reactos.git
synced 2025-05-20 17:45:06 +00:00
[ROSDDT] do_update_base(): Fix assignment to f (#702)
Thanks to "devpao" for reporting this. ROSAPPS-343
This commit is contained in:
parent
d69d401325
commit
8f440355da
1 changed files with 3 additions and 2 deletions
|
@ -146,7 +146,7 @@ static void do_update_base()
|
||||||
wchar_t up_url[MAX_PATH];
|
wchar_t up_url[MAX_PATH];
|
||||||
void *data = NULL;
|
void *data = NULL;
|
||||||
u_long size;
|
u_long size;
|
||||||
FILE *f = NULL;
|
FILE *f;
|
||||||
|
|
||||||
if (GetPrivateProfileString(L"URL", L"udpate", NULL, up_url, MAX_PATH, gl_ini_file) == 0) {
|
if (GetPrivateProfileString(L"URL", L"udpate", NULL, up_url, MAX_PATH, gl_ini_file) == 0) {
|
||||||
wprintf(L"Update URL not found in rosddt.ini\n"); return;
|
wprintf(L"Update URL not found in rosddt.ini\n"); return;
|
||||||
|
@ -156,7 +156,8 @@ static void do_update_base()
|
||||||
|
|
||||||
if (data == http_get(up_url, &size))
|
if (data == http_get(up_url, &size))
|
||||||
{
|
{
|
||||||
if (f == _wfopen(gl_ini_file, L"wb")) {
|
f = _wfopen(gl_ini_file, L"wb");
|
||||||
|
if (f) {
|
||||||
fwrite(data, 1, size, f);
|
fwrite(data, 1, size, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
wprintf(L"Update completed\n");
|
wprintf(L"Update completed\n");
|
||||||
|
|
Loading…
Reference in a new issue