mirror of
https://github.com/switchbrew/nx-hbloader.git
synced 2025-06-21 05:22:40 +02:00
Updated readSetting to handle the out_size param from setsysGetSettingsItemValue with latest libnx. The buffer is now cleared on failure.
This commit is contained in:
parent
92a14f706e
commit
b33c5df54b
@ -51,7 +51,10 @@ static Result readSetting(const char* key, void* buf, size_t size)
|
|||||||
if (R_SUCCEEDED(rc) && actual_size != size)
|
if (R_SUCCEEDED(rc) && actual_size != size)
|
||||||
rc = MAKERESULT(Module_Libnx, LibnxError_BadInput);
|
rc = MAKERESULT(Module_Libnx, LibnxError_BadInput);
|
||||||
if (R_SUCCEEDED(rc))
|
if (R_SUCCEEDED(rc))
|
||||||
rc = setsysGetSettingsItemValue(section_name, key, buf, size);
|
rc = setsysGetSettingsItemValue(section_name, key, buf, size, &actual_size);
|
||||||
|
if (R_SUCCEEDED(rc) && actual_size != size)
|
||||||
|
rc = MAKERESULT(Module_Libnx, LibnxError_BadInput);
|
||||||
|
if (R_FAILED(rc)) memset(buf, 0, size);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user