correct picture

This commit is contained in:
Maxmtg
2014-01-28 06:58:48 +00:00
parent a0d13578f3
commit d5bde7570a

View File

@@ -272,7 +272,7 @@ public class ImageCache {
int artIdx = cp.getArtIndex(); int artIdx = cp.getArtIndex();
if (hasManyPictures) { if (hasManyPictures) {
if ( cntPictures <= artIdx ) // prevent overflow if ( cntPictures <= artIdx ) // prevent overflow
artIdx = cntPictures == 1 ? 0 : artIdx % cntPictures; artIdx = cntPictures == 0 ? 0 : (artIdx - 1 ) % cntPictures;
s.append(artIdx + 1); s.append(artIdx + 1);
} }