summaryrefslogtreecommitdiff
path: root/core/fxcrt
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcrt')
-rw-r--r--core/fxcrt/fx_arabic.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fxcrt/fx_arabic.cpp b/core/fxcrt/fx_arabic.cpp
index 103271cd02..76f2e38663 100644
--- a/core/fxcrt/fx_arabic.cpp
+++ b/core/fxcrt/fx_arabic.cpp
@@ -415,9 +415,9 @@ class CFX_BidiLineTemplate {
void FX_BidiReverseString(std::vector<CFX_Char>& chars,
int32_t iStart,
int32_t iCount) {
- ASSERT(iStart >= 0 && iStart < pdfium::CollectionSize<int32_t>(chars));
- ASSERT(iCount >= 0 &&
- iStart + iCount <= pdfium::CollectionSize<int32_t>(chars));
+ ASSERT(pdfium::IndexInBounds(chars, iStart));
+ ASSERT(pdfium::IndexInBounds(chars, iCount));
+ ASSERT(iStart + iCount <= pdfium::CollectionSize<int32_t>(chars));
std::reverse(chars.begin() + iStart, chars.begin() + iStart + iCount);
}
@@ -426,7 +426,7 @@ class CFX_BidiLineTemplate {
int32_t iStart,
int32_t iCount,
int32_t iValue) {
- ASSERT(iStart >= 0 && iStart <= pdfium::CollectionSize<int32_t>(chars));
+ ASSERT(pdfium::IndexInBounds(chars, iStart));
ASSERT(iStart - iCount > -1);
int32_t iLast = iStart - iCount;
if (bClass) {