fix printf %ls with precision limit over-read issue