fix(libc): handle bare hexadecimal prefixes on Windows #3082

Merged
MarcZX10 merged 1 commit from upstream-pr/3082 into main 2026-10-10 22:01:33 +00:00
MarcZX10 commented 2026-10-10 21:51:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-10T21:51:06Z.


What

Carry screamm's explicitly offered Windows strtol-family fix from issue #3075. A bare 0x prefix without a following hexadecimal digit is treated as the initial zero, leaving the end pointer immediately after that zero, consistent with the C subject-sequence rule, FreeBSD, and glibc.

Tested

The contributor reports Windows 11 Pro 26220 / WinLibs GCC 15.2.0 / Release full build including libs; guest_math passed 3/3 and ctest -j8 -E "^agc_|video_out" passed 388/388. Linux runtime tests were not reported because this helper is Windows-only. In this session, conventions and git diff --check passed; the local full CMake configure was blocked by the unavailable pinned SDL2 submodule commit.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4814683979 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3082). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-10T21:51:06Z. --- ### What Carry screamm's explicitly offered Windows `strtol`-family fix from issue #3075. A bare `0x` prefix without a following hexadecimal digit is treated as the initial zero, leaving the end pointer immediately after that zero, consistent with the C subject-sequence rule, FreeBSD, and glibc. ### Tested The contributor reports Windows 11 Pro 26220 / WinLibs GCC 15.2.0 / Release full build including `libs`; `guest_math` passed 3/3 and `ctest -j8 -E "^agc_|video_out"` passed 388/388. Linux runtime tests were not reported because this helper is Windows-only. In this session, conventions and `git diff --check` passed; the local full CMake configure was blocked by the unavailable pinned SDL2 submodule commit. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!3082
No description provided.