[NUI] Bug fixed about TextPageUtil (#2111)
authorJoogabYun <40262755+JoogabYun@users.noreply.github.com>
Thu, 22 Oct 2020 06:10:57 +0000 (15:10 +0900)
committerGitHub <noreply@github.com>
Thu, 22 Oct 2020 06:10:57 +0000 (15:10 +0900)
add check remainLength and init totalPageCnt value

src/Tizen.NUI/src/public/Utility/TextPageUtil.cs

index ac75314..82da12f 100755 (executable)
@@ -101,6 +101,7 @@ namespace Tizen.NUI.Utility
       int cutOffIndex = 0;
 
       // init
+      totalPageCnt = 0;
       pageList = new List<PageData>();
       tagList = new List<TagData>();
       characterList = new List<char>();
@@ -150,7 +151,7 @@ namespace Tizen.NUI.Utility
             pageList.Add(pageData);
           }
           totalPageCnt++;
-          if(offset <= 0 ) break;
+          if(offset <= 0 || remainLength <= 0 ) break;
       }
 
       textParameters.Dispose();