Fixing an indefinite loop with unterminated string.
Merge pull request #2 from qnoturas/UnterminatedStringFix

Fixing an indefinite loop with unterminated string.