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

Investigating reported code bugs #69

Open
Pyrdacor opened this issue Sep 16, 2022 · 2 comments
Open

Investigating reported code bugs #69

Pyrdacor opened this issue Sep 16, 2022 · 2 comments
Assignees

Comments

@Pyrdacor
Copy link
Owner

Pyrdacor commented Sep 16, 2022

A guy called st-th mentioned some code bugs long ago. Maybe I can find and fix some of them. Original text:

It may sound funny, but all those corrupted text files are not the real problem. Sure, they are the most obvious "in your face" bugs, crashing the game to boot, but they can be properly fixed eventually. I have some ideas about it and when they work out, it will actually be rather trivial.

However, the real problem are code bugs. To give you an idea, here are a few small ones I've fixed:

  • Calling graphics.library's VideoControl() function with a messed-up pointer argument. This affects every system running OS 3.0 or newer and could result in sprite display errors during and after the game.

  • Testing the result of dos.library's Open() function with a wrong conditional branch with the result that every failure to open a file is treated as success followed by subsequent accesses to an illegal file handle.

  • A major logic bug in handling a status flag which could result in messing up internal structures.

  • Not restoring pr_WindowPtr to its original value under certain circumstances which will crash the system the moment dos.library wants to display a requester.

And the list goes on and on... The game opens libraries and uses them without checking for open failure. It has memory leaks under certain circumstances. It even has classic buffer overrun bugs (try inputting all words from the game's dictionary at a riddlemouth).

Mentioned here by @a1exh: #66

@Pyrdacor Pyrdacor self-assigned this Sep 16, 2022
@a1exh
Copy link

a1exh commented Mar 3, 2025

Now that some of the original source code has been published maybe we could go back to look at the authenticity of some of the bugs mentioned here http://eab.abime.net/showpost.php?p=531661&postcount=174

@Pyrdacor
Copy link
Owner Author

Pyrdacor commented Mar 3, 2025

Maybe the time is right to merge the original code with my disassembly to provide the missing parts and fix stuff there then.

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

No branches or pull requests

2 participants