mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-27 00:28:14 +00:00
Merge pull request #10921 from MarcZX10/marc/fix-sysctl-copyout-null-source
fix(libkernel): skip the sysctl copy-out when no bytes are copied
This commit is contained in:
1 file changed
+1
-1
@@ -32,7 +32,7 @@ int CopyOut(const void* value, std::size_t size, void* oldValue, std::size_t* ol
|
||||
return 0;
|
||||
}
|
||||
const std::size_t copied = std::min(oldLength != nullptr ? *oldLength : 0, size);
|
||||
std::memcpy(oldValue, value, copied);
|
||||
if (copied != 0) std::memcpy(oldValue, value, copied);
|
||||
if (oldLength != nullptr) *oldLength = copied;
|
||||
if (copied < size) {
|
||||
*__error_nid_postfix() = 12;
|
||||
|
||||
Reference in new issue
Block a user