fix(trophy2): accept a null data or details in sceNpTrophy2GetGameInfo #912

Merged
Pacuka merged 1 commit from upstream-pr/912 into main 2026-10-06 21:17:50 +00:00
Pacuka commented 2026-10-06 16:07:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Pacuka on 2026-10-06T16:07:57Z.


What

sceNpTrophy2GetGameInfo rejected a call unless both outputs were given, although the function already fills each one only when it is not null. The Smurfs Dreams (PPSA21607, Unreal Engine) asks only for the game details: it passes a null data (xor ecx, ecx before the call), reads the trophy count from the details on success and takes its error path on a negative result. Only a call with neither output is rejected now.

Tested

  • CachyOS, Linux 7.2, GCC, Release, based on 5895ea72. guest_nptrophy2 now covers details only, data only, and neither (still throws); it aborts without the fix. Full ctest: 359/359.
  • The Smurfs Dreams: the call succeeds and the title continues to its audio set-up.
  • Windows not built or tested.

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 (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4761465814 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/912). Originally posted by [Pacuka](https://github.com/Pacuka) on 2026-10-06T16:07:57Z. --- ### What `sceNpTrophy2GetGameInfo` rejected a call unless both outputs were given, although the function already fills each one only when it is not null. The Smurfs Dreams (PPSA21607, Unreal Engine) asks only for the game details: it passes a null `data` (`xor ecx, ecx` before the call), reads the trophy count from the details on success and takes its error path on a negative result. Only a call with neither output is rejected now. ### Tested - CachyOS, Linux 7.2, GCC, Release, based on `5895ea72`. `guest_nptrophy2` now covers details only, data only, and neither (still throws); it aborts without the fix. Full ctest: 359/359. - The Smurfs Dreams: the call succeeds and the title continues to its audio set-up. - Windows not built or tested. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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 (attach them to this PR) - [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 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!912
No description provided.