summaryrefslogtreecommitdiff
path: root/idl/inc/lex.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'idl/inc/lex.hxx')
-rw-r--r--idl/inc/lex.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/idl/inc/lex.hxx b/idl/inc/lex.hxx
index 238f5b904d20..2f816358bca8 100644
--- a/idl/inc/lex.hxx
+++ b/idl/inc/lex.hxx
@@ -140,7 +140,9 @@ class SvTokenStream
int GetNextChar();
int GetFastNextChar()
{
- return aBufStr[nBufPos++];
+ return (nBufPos < aBufStr.getLength())
+ ? aBufStr[nBufPos++]
+ : '\0';
}
void FillTokenList();