Replaced sizeof(str)-1 and magic nums with charsmax
Merge pull request #89 from skyrim/code/charsmax-magic-nums

Replaced sizeof(str)-1 and magic nums with charsmax
Fix compilation.
Merge pull request #90 from Arkshine/fix-compilation

Fix compilation.