fix invalid string access, related #i83611#

Change-Id: I5954f78e10d99a064f83e96282c28c086c7f07f1
Reviewed-on: https://gerrit.libreoffice.org/8096
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>