diff options
author | Paul Gardiner <paulg.artifex@glidos.net> | 2012-08-16 11:30:10 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2012-08-16 13:41:19 +0200 |
commit | 9e00b5389fe386479c4bd880434f86f66c44b613 (patch) | |
tree | d060312db8bdc32062f5e0f128f49360ce058fca | |
parent | f0cdcaa64390fa6fc8f189b5516b7cec0e2b1bc6 (diff) | |
download | mupdf-9e00b5389fe386479c4bd880434f86f66c44b613.tar.xz |
Android: fix divide by zero error
-rw-r--r-- | android/src/com/artifex/mupdf/MuPDFActivity.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/android/src/com/artifex/mupdf/MuPDFActivity.java b/android/src/com/artifex/mupdf/MuPDFActivity.java index fb3c4552..c530b01b 100644 --- a/android/src/com/artifex/mupdf/MuPDFActivity.java +++ b/android/src/com/artifex/mupdf/MuPDFActivity.java @@ -305,7 +305,7 @@ public class MuPDFActivity extends Activity makeButtonsView(); // Set up the page slider - int smax = core.countPages()-1; + int smax = Math.max(core.countPages()-1,1); mPageSliderRes = ((10 + smax - 1)/smax) * 2; // Set the file-name text |