grumpycoders / grumpycoders/pcsx-redux

Accessing `psxRegisters` struct incorrectly causes crash to desktop

Open
#1,252 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
994
Forks
151
Avg merge
1d 15h
Merged PRs (30d)
18

Description

While writing a lua script, I was incorrectly accessing the registers like so

```
local regs = PCSX.getRegisters()
local offsets = regs.a0
```

This was causing pcsx-redux to crash to desktop with no warning/error/logging

Fixing the script to use the correct fields
```
local regs = PCSX.getRegisters()
local offsets = regs.GPR.n.a0
```
fixed the issue, but the problem remains that the applicaton crashed from illegally accessing a struct field that didn't exist.

I'd expect that the application would handle this without crashing.

`pcsx-redux-nightly-14035.20230321.9-x64`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.