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

Unified Diff: experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp

Issue 23902018: pdfviewer: do not submit, uploaded for backup, and will be done actually after I refactor the param… Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 3 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 | « experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp ('k') | gyp/pdfviewer_lib.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp
===================================================================
--- experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp (revision 11117)
+++ experimental/PdfViewer/pdfparser/native/SkPdfNativeTokenizer.cpp (working copy)
@@ -811,11 +811,15 @@
// skip white spaces
start = skipPdfWhiteSpaces(level, start, end);
+ if (start >= end) {
+ return end;
+ }
+
current = endOfPdfToken(level, start, end);
// no token, len would be 0
- if (current == start) {
- return NULL;
+ if (current == start || current == end) {
+ return end;
}
int tokenLen = current - start;
« no previous file with comments | « experimental/PdfViewer/pdfparser/native/SkPdfNativeObject.cpp ('k') | gyp/pdfviewer_lib.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698