Skip to content

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.

Fixed an off by 1 issue with reading manga (for real now)

Joseph Milazzo852317d3a6f0
diff --git a/API/Services/CacheService.cs b/API/Services/CacheService.cs
index a37812f53..b7b46e86f 100644
--- a/API/Services/CacheService.cs
+++ b/API/Services/CacheService.cs
@@ -113,7 +113,7 @@ namespace API.Services
Array.Sort(files, _numericComparer);
// Since array is 0 based, we need to keep that in account (only affects last image)
- if (page - 1 == files.Length)
+ if (page == files.Length)
{
return (files.ElementAt(page - 1 - pagesSoFar), mangaFile);
}