upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorc4k3ss <77441265+c4k3ss@users.noreply.github.com>2026-11-24 19:53:39 +0200
committerc4k3ss <77441265+c4k3ss@users.noreply.github.com>2026-11-24 19:53:39 +0200
commitd72a0c9f50419c80da626afb7fd8f2bccdf7992c (patch)
treeb30cf0ce7a566331c77217aca38c2f4e60d9d6f2 /runtime
parentc156e77c46ed51a378dd55493c42fd914a70ba4d (diff)
xgameruntime: correct the pls_get_path short-buffer comment
The XSystem id getters (XSystemGetConsoleId, copy_id) return ERROR_INSUFFICIENT_BUFFER without setting *used, so they are not the precedent the comment named. Say what the code does instead: the buffer is untouched and *path_used gets the path length with its NUL, the value slot 3 (pls_get_path_size) reports. Comment only, no behavior change. Noted by moffington in review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime')
-rw-r--r--runtime/shims/xgameruntime.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/shims/xgameruntime.cpp b/runtime/shims/xgameruntime.cpp
index eeff9e6e1..d79021afa 100644
--- a/runtime/shims/xgameruntime.cpp
+++ b/runtime/shims/xgameruntime.cpp
@@ -523,7 +523,7 @@ HRESULT STDMETHODCALLTYPE pls_get_path(void*, size_t path_size, char* path, size
523 const std::string folder = utf8_of(persistent_storage_dir().native()); 523 const std::string folder = utf8_of(persistent_storage_dir().native());
524 if (folder.empty()) return HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND); 524 if (folder.empty()) return HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND);
525 if (path_size < folder.size() + 1) { 525 if (path_size < folder.size() + 1) {
526 // The (size, buffer, used) convention of the XSystem id getters: a short buffer learns the size it needs. 526 // A short buffer is left untouched but learns the size it needs: the path with its NUL, as slot 3 reports.
527 if (path_used) *path_used = folder.size() + 1; 527 if (path_used) *path_used = folder.size() + 1;
528 return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER); 528 return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
529 } 529 }