summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorAugust Sodora <augsod@gmail.com>2012-01-14 17:47:43 -0500
committerAugust Sodora <augsod@gmail.com>2012-01-14 18:39:57 -0500
commite4d6dfae33102891cbea0d330a31bb21572d5959 (patch)
treed54c0dba1768e3b6b7ca4f60b1b82236e1800ed7 /basic
parent679a8e1cfd4845634e379d0678fa1c352f7b97fd (diff)
Remove use of pLine in scanner
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/scanner.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index f3ba9bd36667..4e016793334b 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -308,8 +308,8 @@ bool SbiScanner::NextSym()
}
// read in and convert if number
- else if( theBasicCharClass::get().isDigit( *pLine & 0xFF )
- || ( *pLine == '.' && theBasicCharClass::get().isDigit( *(pLine+1) & 0xFF ) ) )
+ else if((nCol < aLine.getLength() && theBasicCharClass::get().isDigit(aLine[nCol] & 0xFF)) ||
+ (nCol + 1 < aLine.getLength() && aLine[nCol] == '.' && theBasicCharClass::get().isDigit(aLine[nCol + 1] & 0xFF)))
{
short exp = 0;
short comma = 0;