From e4d6dfae33102891cbea0d330a31bb21572d5959 Mon Sep 17 00:00:00 2001 From: August Sodora Date: Sat, 14 Jan 2012 17:47:43 -0500 Subject: Remove use of pLine in scanner --- basic/source/comp/scanner.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'basic') 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; -- cgit