Fix an out of bounds write error. Some more protection when reading in data and finally fix a few type casts warnings.

git-svn-id: http://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3828 ed541006-0bf7-43e9-8c4d-6fc63c346d47
Fix bug 391 by relaxing the SET /P check.

git-svn-id: http://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3829 ed541006-0bf7-43e9-8c4d-6fc63c346d47
Merge DOSBox svn r3829 into idados