mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:05:54 +01:00
[PR #842] [MERGED] xgameruntime: XPersistentLocalStorageGetPath reports the required size on a short buffer (RT-712) #882
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#882
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/842
Author: @c4k3ss
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD
Base:
main← Head:rt/pls-get-path-size📝 Commits (2)
c156e77xgameruntime: XPersistentLocalStorageGetPath reports the required size on a short buffer (RT-712)d72a0c9xgameruntime: correct the pls_get_path short-buffer comment📊 Changes
2 files changed (+12 additions, -3 deletions)
View changed files
📝
runtime/shims/xgameruntime.cpp(+5 -1)📝
runtime/test/xgameruntime_test.cpp(+7 -2)📄 Description
Claimed in the coordination issue as: RT-712 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7134292009), carried over from the upstream repository, where it was open and independently tested when the repository went private.
What and why
pls_get_path(XPersistentLocalStorageGetPath, slot 4 ofXPersistentLocalStorageImplinruntime/shims/xgameruntime.cpp) answered a short buffer withERROR_INSUFFICIENT_BUFFERand*path_used = 0, so a title that passes a small buffer with a non-nullusedpointer learns nothing about the size it needs. Slot 3 (pls_get_path_size) already reports that size; this makespls_get_pathreport it on the short-buffer error too: on a short buffer*path_usedis the path length with its NUL, the buffer is untouched and theHRESULTis unchanged. The success path is unchanged.Tested
runtime/test/xgameruntime_test.cpp, in the existingXPersistentLocalStorageImplblock: the short-buffer case checksused == size(slot 3's answer) and that the two-byte buffer is left alone; a buffer one byte short reports the same size; a nullusedpointer on a short buffer is tolerated.maind0da7dade:ctest -R ^xgameruntime$passes with the change. Negative control (thismain'sxgameruntime.cppwith the new test):xgameruntime_test: 2 of 160 checks failed, the two new size checks.GPUs tested: n/a (CPU-only shim and test)
AI-assisted: yes (Claude Code); built and tested on the machine above.
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (not a translator change)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.