Potential fix for #23.

This resolves a buffer overflow which could potentially have been causing
heap corruptions when using the shop menu.