mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 16:43:05 -05:00
Guest descriptors are host C runtime descriptors. Closing descriptor 0, 1 or 2 closed the host process's standard stream, and the runtime then gave that number to the next file opened anywhere in the process, including files libkernel opens itself, such as the APR reader's. The title's next close of the same number closed that file mid-read. close and sceKernelClose now fail with EBADF for descriptors 0 to 2 that were open when libkernel loaded, and leave them open. A standard descriptor that was not open at load can still be opened and closed by the guest. PPSA21703 calls sceKernelClose(0) repeatedly while loading asset bundles, which made APR reads return 0 or a part of the requested bytes and raised UCRT invalid parameter reports from close. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>