Fix svace issue on text-geometry (unsigned int < 0)
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-geometry.cpp
index e599922..9fa5ad1 100644 (file)
@@ -67,15 +67,9 @@ void GetTextGeometry(ModelPtr textModel, CharacterIndex startIndex, CharacterInd
   const CharacterIndex* const     glyphToCharacterBuffer         = visualModel->mGlyphsToCharacters.Begin();
   const CharacterDirection* const modelCharacterDirectionsBuffer = (0u != logicalModel->mCharacterDirections.Count()) ? logicalModel->mCharacterDirections.Begin() : NULL;
 
-  if((startIndex < 0 && endIndex < 0) || (startIndex >= logicalModel->mText.Count() && endIndex >= logicalModel->mText.Count()))
+  if(startIndex >= logicalModel->mText.Count() && endIndex >= logicalModel->mText.Count())
     return;
 
-  if(startIndex < 0)
-    startIndex = 0;
-
-  if(endIndex < 0)
-    endIndex = 0;
-
   if(startIndex >= logicalModel->mText.Count())
     startIndex = logicalModel->mText.Count() - 1;