Ok, I really tried to figure this out by myself. But it's been a reoccuring bug for a long time.
When you play my game, and die in battle. Then Either Ressurect directly to town, or Load a Saved game. If you try to quit after doing these, instead of breaking the program and exiting, it either Loads the Saved Game file, or Jumps into a Battle, or Jumps into the Search Option. I can't figure out how these are linked. And why it's only after you die. Source code is here. If you can help i thank you ahead of time.
Another minor bug you may be able to see if you look at the code. After you fight an enemy. It's name seems to be appended to the end of your armorname. Go to your stats screen and you'll see the name of the last enemy you fought, on the end of your armorname. It saves this way in the save file as well which to me shows it's actually being added to the string.
P.S. - I'm using Dev C++