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

The calculation of string length was done wrong for dingle
quoted string resulting in negative lengths.