Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1395)

Unified Diff: core/fpdfapi/fpdf_font/fpdf_font_cid.cpp

Issue 1906213002: Remove one warning from PDFium compilation in Cros (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
diff --git a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
index d5fe4dfd92ef582abc1a9452adca739743c5e18e..01a0f6cbdd41c8f7e0d4bdf45f9688376c89d11e 100644
--- a/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
+++ b/core/fpdfapi/fpdf_font/fpdf_font_cid.cpp
@@ -191,7 +191,9 @@ CIDSet CIDSetFromSizeT(size_t index) {
}
CFX_ByteStringC CMap_GetString(const CFX_ByteStringC& word) {
- return word.Mid(1, word.GetLength() - 2);
+ if (word.GetLength() <= 2)
+ return CFX_ByteStringC();
+ return CFX_ByteStringC(&word[1], word.GetLength() - 2);
}
int CompareDWORD(const void* data1, const void* data2) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698