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

Fix for MajorMUD 1.11p Help File (MSG) #481

Merged
merged 2 commits into from
May 3, 2021
Merged

Conversation

enusbaum
Copy link
Member

@enusbaum enusbaum commented May 1, 2021

  • Fixes mid-identification of data type of it's on its own line prior to the following identifier

MajorMUD 1.11p (WCCMMUD) uses a MSG file for parsing the help commands (using sameto()) and the help content. This file isn't exactly formatted consistently, specifically the MSG type definition is on its own line in several parts of the file:

image

vs

image

Because of this, our MSG parsing code was identifying the String string as the following identifier, and since it contained spaces and then alpha characters for the ACTUAL following identifier, it set the state to JUNK for the actual identifier when it was encountered. This caused the offset of the MSG ordinals to be off and all kinds of bad memory overflows to happen.

This SHOULD fix it, but it's not resilient as a MSG identifier followed by a \r before { will be thrown away as junk. This probably needs some testing.

- Fixes mid-identification of data type of it's on its own line prior to the following identifier
@enusbaum enusbaum requested a review from paladine May 1, 2021 21:26
MBBSEmu/Module/MsgFile.cs Outdated Show resolved Hide resolved
Changed to Pattern and added case for `\n`
@enusbaum enusbaum merged commit c4394f7 into master May 3, 2021
@enusbaum enusbaum deleted the majormud-help-msg branch May 3, 2021 16:10
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.

2 participants