Fix buffer overflow
Merge pull request #1 from crumblingstatue/master

Fix buffer overflow