summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2017-05-16 07:30:05 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-05-16 07:30:05 +0000
commitbbdf0b8778230f6dc94b8a19c4bac98d66354948 (patch)
tree8557d447a311d7f212218b9c52cf342b7d3ce08a
parentdb570e5785b42bca84779865ae2064e51915f65e (diff)
parent50bce460f7b0f0a14c78881be5c1fdf7d1c8dbc2 (diff)
downloaddng_sdk-android-8.0.0_r11.tar.gz
Change-Id: Icea36f374c9ad2889c4cf08ddb49e10984d55601
-rw-r--r--source/dng_ifd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/dng_ifd.cpp b/source/dng_ifd.cpp
index 317ebf9..7f22065 100644
--- a/source/dng_ifd.cpp
+++ b/source/dng_ifd.cpp
@@ -3979,7 +3979,7 @@ uint32 dng_ifd::TilesAcross () const
if (fTileWidth)
{
- return (fImageWidth + fTileWidth - 1) / fTileWidth;
+ return (SafeUint32Sub(SafeUint32Add(fImageWidth, fTileWidth), 1)) / fTileWidth;
}
@@ -3995,7 +3995,7 @@ uint32 dng_ifd::TilesDown () const
if (fTileLength)
{
- return (fImageLength + fTileLength - 1) / fTileLength;
+ return (SafeUint32Sub(SafeUint32Add(fImageLength, fTileLength), 1)) / fTileLength;
}