aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/pdf/SkPDFCatalog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pdf/SkPDFCatalog.cpp b/src/pdf/SkPDFCatalog.cpp
index b26c923c16..49c0404974 100644
--- a/src/pdf/SkPDFCatalog.cpp
+++ b/src/pdf/SkPDFCatalog.cpp
@@ -128,9 +128,9 @@ int32_t SkPDFCatalog::emitXrefTable(SkWStream* stream, bool firstPage) {
first++;
}
for (int i = first; i <= last; i++) {
- // For 32 bits platforms, the maximum offset has to fit within off_t which is a 32 bits
- // signed integer on these platforms. On other platforms, we can use the actual maximum.
- SkDEBUGCODE(static const off_t kMaxOff = (sizeof(off_t) > 4) ? 10000000000 : 2147483647;)
+ // For 32 bits platforms, the maximum offset has to fit within off_t
+ // which is a 32 bits signed integer on these platforms.
+ SkDEBUGCODE(static const off_t kMaxOff = SK_MaxS32;)
SkASSERT(fCatalog[i].fFileOffset > 0);
SkASSERT(fCatalog[i].fFileOffset < kMaxOff);
stream->writeBigDecAsText(fCatalog[i].fFileOffset, 10);