Changes to code that change the meaning of the code are very rarely minor changes, even if they are only a few characters.
Be certain that it is an actual error in the code, and that your change is an actual fix, and that the fix lines up with what you have good reason to think was the original intention of the author. Then edit away. Yes, you cannot read minds, but the perfect is the enemy of the good.
Include your reasoning why you think it was in error, and why your fix is correct, in the edit comments. This is important -- a raw change to code with no argument why the change is better than what was there before has issues. Expect your change to be possibly rejected by someone who may not even know the language of the code you are changing -- so your argument why your code change is correct needs to be solid.
If you cannot expect to "get back" to the problem if your edit is rejected, also leave a comment, so even if the edit is rejected there will be information for the poor sap trying to work with the problem example code.
A message to the original poster I would stick in the edit message, rather than in a comment: it doesn't add value to 3rd parties, unless said 3rd party is interested in the edit history.