Fix SVACE issue 58/156358/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Wed, 18 Oct 2017 06:26:59 +0000 (15:26 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Wed, 18 Oct 2017 07:04:38 +0000 (16:04 +0900)
- Expression 'y' and 'x' have type 'unsigned int',
 so they're never less than zero in text-typesetter.cpp

Change-Id: Ia8e54bc18192f6e5eacde7fe899e9ca2978d81a9
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
dali-toolkit/internal/text/rendering/text-typesetter.cpp

index 3184d4a..9559460 100755 (executable)
@@ -609,7 +609,7 @@ Devel::PixelBuffer Typesetter::CreateImageBuffer( const unsigned int bufferWidth
 
       for( unsigned int y = underlineYOffset; y < underlineYOffset + maxUnderlineThickness; y++ )
       {
-        if( ( y < 0 ) || ( y > bufferHeight - 1 ) )
+        if( y > bufferHeight - 1 )
         {
           // Do not write out of bounds.
           break;
@@ -617,7 +617,7 @@ Devel::PixelBuffer Typesetter::CreateImageBuffer( const unsigned int bufferWidth
 
         for( unsigned int x = glyphData.horizontalOffset + lineExtentLeft; x <= glyphData.horizontalOffset + lineExtentRight; x++ )
         {
-          if( ( x < 0 ) || ( x > bufferWidth - 1 ) )
+          if( x > bufferWidth - 1 )
           {
             // Do not write out of bounds.
             break;