Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding AR code repeat limit #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

john-peterson
Copy link
Member

Adding AR code repeat limit

Problem

An incorrect code will overwrite much memory and crash the process

F.e. this GALE01 code

17:52:053 Src\ActionReplay.cpp:241 I[ActionReplay]: Code Name: P1 - Invincible
17:52:054 Src\ActionReplay.cpp:241 I[ActionReplay]: Number of codes: 3
17:52:054 Src\ActionReplay.cpp:241 I[ActionReplay]: --- Running Code: 00084e6c 08000000 ---
17:52:055 Src\ActionReplay.cpp:241 I[ActionReplay]: Doing Normal Code 00000000
17:52:055 Src\ActionReplay.cpp:241 I[ActionReplay]: Subtype: 00000000
17:52:056 Src\ActionReplay.cpp:241 I[ActionReplay]: Doing Ram Write And Fill
17:52:056 Src\ActionReplay.cpp:241 I[ActionReplay]: Hardware Address: 80084e6c
17:52:056 Src\ActionReplay.cpp:241 I[ActionReplay]: Size: 00000000
17:52:057 Src\ActionReplay.cpp:241 I[ActionReplay]: 8-bit Write
17:52:057 Src\ActionReplay.cpp:241 I[ActionReplay]: --------
17:52:057 Src\ActionReplay.cpp:241 I[ActionReplay]: Repeat: 00080000
17:52:057 Src\ActionReplay.cpp:241 I[ActionReplay]: --------

Solution

Limit repeat to 0xffff because

  • there's no correct code that has a higher repeat than that

Discussion

[03:13] @Sonicadvance1 JPeterson, Pull request #25, no

What's the reason that you oppose the change?

[03:32] @Sonicadvance1 JPeterson, Pull request #25, It's an artificial limitation. If someone has the wrong code in the database, an issue should instead be created to have that particular code rectified or removed

because that avoid incorrect code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant