Fix bug in jv_string_truncate()