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

Unified Diff: xfa/fgas/font/fgas_stdfontmgr.cpp

Issue 2430743003: in the attempt to fix 627393, changed IFX_FileRead's readBlock to return the length it reads
Patch Set: delete the include folder Created 4 years, 1 month 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
Index: xfa/fgas/font/fgas_stdfontmgr.cpp
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index d4907bb91980d80805bab6fd1149383cddf5eafa..ce05a873ab6798933138401355be107e03f8fbcc 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -869,8 +869,8 @@ unsigned long _ftStreamRead(FXFT_Stream stream,
IFX_SeekableReadStream* pFile =
(IFX_SeekableReadStream*)stream->descriptor.pointer;
- int res = pFile->ReadBlock(buffer, offset, count);
- if (res)
+ if (pFile->ReadBlock(buffer, offset, count) == static_cast<size_t>(count) ||
+ pFile->IsEOF())
return count;
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698