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

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: remove .tmp files Created 4 years, 2 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
Index: xfa/fgas/font/fgas_stdfontmgr.cpp
diff --git a/xfa/fgas/font/fgas_stdfontmgr.cpp b/xfa/fgas/font/fgas_stdfontmgr.cpp
index 96081f57996bd8d8b88ef3e475cd4bd1d024fdaa..b16392f37e36bedf08f0857c8ac12d8f2f1137a8 100644
--- a/xfa/fgas/font/fgas_stdfontmgr.cpp
+++ b/xfa/fgas/font/fgas_stdfontmgr.cpp
@@ -876,8 +876,7 @@ unsigned long _ftStreamRead(FXFT_Stream stream,
return 0;
IFX_FileRead* pFile = (IFX_FileRead*)stream->descriptor.pointer;
- int res = pFile->ReadBlock(buffer, offset, count);
- if (res)
+ if (pFile->ReadBlock(buffer, offset, count) == count || pFile->IsEOF())
return count;
return 0;
}

Powered by Google App Engine
This is Rietveld 408576698