fix: correct sscanf %x signedness and avoid a substr copy #15
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by obelisk-complex on 2026-09-26T20:13:31Z.
libSceSysmodule/Export.cppparsed/proc/self/mapsdevice major/minor numbers intosigned intwith a%xformat, which is undefined behaviour per the C standard even though it happened to work on this target; switched tounsigned intto match the format specifier.NidPatcherUtils.hpp'sStripNidPostfixbuilt a truncated copy withsubstr(0, n)where the prefix is already the string itself;resize(n)does the same truncation without the extra allocation and copy.Changes
core/libs/prx/libSceSysmodule/Export.cpp:devMajor/devMinornowunsigned int.core/libs/nid/include/nid/NidPatcherUtils.hpp: twosubstr(0, n)calls replaced withresize(n).Testing (Linux, GCC)
ctest: 23/30, the same 7 pre-existing failures as onmain, unaffected by this change.🤖 Generated with Claude Code