diff options
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/optdlg/tpusrlst.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index 2b986ce09c9d..89c9d19c930b 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -333,14 +333,14 @@ void ScTpUserLists::MakeListStr( OUString& rListStr ) while ( c < nLen ) { rListStr += OUString(aStr[c]); - c++; + ++c; - if ( aStr[c] == cDelimiter ) + if ((c < nLen) && (aStr[c] == cDelimiter)) { rListStr += OUString(aStr[c]); - while ( (c < nLen) && (aStr[c] == cDelimiter) ) - c++; + while ((c < nLen) && (aStr[c] == cDelimiter)) + ++c; } } |