(PUP-2693) Fix length calculation for sq-string

The calculation of string length was done wrong for dingle
quoted string resulting in negative lengths.
Merge pull request #2755 from hlindberg/PUP-2693_length-of-sqstring-wrong

(PUP-2693) Fix length calculation for sq-string