Fix infinite loops with negative counts
Negative counts are now treated as zero
Fixes #131
Merge pull request #132 from oliversalzburg/fix/negative-string-length

Fix infinite loops with negative counts