Refinements of an earlier fix. Thanks ripsaw

git-svn-id: http://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3821 ed541006-0bf7-43e9-8c4d-6fc63c346d47