[jak2] fix crash with *print-column* loading the wrong memory (#2281)

`inspect` also prints with the correct indent now as a result.
This commit is contained in:
ManDude 2023-02-26 21:04:05 +00:00 committed by GitHub
parent 9b80bca589
commit 63ff337169
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View file

@ -49,7 +49,7 @@ void InitListener() {
kernel_dispatcher = intern_from_c("kernel-dispatcher");
sync_dispatcher = intern_from_c("sync-dispatcher");
kernel_packages = intern_from_c("*kernel-packages*");
print_column = intern_from_c("*print-column*").cast<u32>();
print_column = intern_from_c("*print-column*").cast<u32>(); // this is wrong
ListenerLinkBlock->value() = s7.offset;
ListenerFunction->value() = s7.offset;
KernelFunction->value() = s7.offset;

View file

@ -93,7 +93,7 @@ s32 format_impl_jak2(uint64_t* args) {
// read goal binteger
if (print_column.offset) {
// added the if check so we can format even if the kernel didn't load right.
indentation = (*print_column) >> 3;
indentation = (*(print_column - 1)) >> 3;
}
// which arg we're on

View file

@ -244,7 +244,7 @@ LoadStackEntry* FS_OpenWad(FileRecord* fr, int32_t offset) {
* This is an ISO FS API Function
*/
void FS_Close(LoadStackEntry* fd) {
lg::debug("[OVERLORD] FS_Close {}", fd->fr->name);
lg::debug("[OVERLORD] FS_Close {} @ {}/{}", fd->fr->name, fd->fr->location, fd->location);
// close the FD
fd->fr = nullptr;

View file

@ -7,6 +7,8 @@
|#
(declare-file (debug))
(define *debug-temp-string* (new 'debug 'string 4096 (the string #f)))
(defmethod set-entity! entity-debug-inspect ((obj entity-debug-inspect) (e entity))