| Index: src/pdf/SkPDFCatalog.cpp
|
| ===================================================================
|
| --- src/pdf/SkPDFCatalog.cpp (revision 8038)
|
| +++ src/pdf/SkPDFCatalog.cpp (working copy)
|
| @@ -128,8 +128,11 @@
|
| 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;)
|
| SkASSERT(fCatalog[i].fFileOffset > 0);
|
| - SkASSERT(fCatalog[i].fFileOffset <= 9999999999LL);
|
| + SkASSERT(fCatalog[i].fFileOffset < kMaxOff);
|
| stream->writeBigDecAsText(fCatalog[i].fFileOffset, 10);
|
| stream->writeText(" 00000 n \n");
|
| }
|
|
|