[Libreoffice-commits] core.git: filter/source
Caolán McNamara
caolanm at redhat.com
Fri Jan 27 10:40:11 UTC 2017
filter/source/graphicfilter/ieps/ieps.cxx | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
New commits:
commit 521723b1180a32c02a88ed47137d4242c06eaca7
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 27 10:38:44 2017 +0000
move deref inside (laughable) nSecurityCount check
Change-Id: Idf9a83ffa80137967d8c77d7a9b5133529fc2858
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 63ef80d..989bc43 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -76,10 +76,9 @@ static long ImplGetNumber(sal_uInt8* &rBuf, sal_uInt32& nSecurityCount)
long nRetValue = 0;
while ( ( --nSecurityCount ) && ( ( *rBuf == ' ' ) || ( *rBuf == 0x9 ) ) )
rBuf++;
- sal_uInt8 nByte = *rBuf;
- while ( nSecurityCount && ( nByte != ' ' ) && ( nByte != 0x9 ) && ( nByte != 0xd ) && ( nByte != 0xa ) )
+ while ( nSecurityCount && ( *rBuf != ' ' ) && ( *rBuf != 0x9 ) && ( *rBuf != 0xd ) && ( *rBuf != 0xa ) )
{
- switch ( nByte )
+ switch ( *rBuf )
{
case '.' :
// we'll only use the integer format
@@ -89,17 +88,17 @@ static long ImplGetNumber(sal_uInt8* &rBuf, sal_uInt32& nSecurityCount)
bNegative = true;
break;
default :
- if ( ( nByte < '0' ) || ( nByte > '9' ) )
+ if ( ( *rBuf < '0' ) || ( *rBuf > '9' ) )
nSecurityCount = 1; // error parsing the bounding box values
else if ( bValid )
{
nRetValue *= 10;
- nRetValue += nByte - '0';
+ nRetValue += *rBuf - '0';
}
break;
}
nSecurityCount--;
- nByte = *(++rBuf);
+ ++rBuf;
}
if ( bNegative )
nRetValue = -nRetValue;
More information about the Libreoffice-commits
mailing list