Skip to content

Commit

Permalink
Merge branch 'main' into sync_readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Frooodle authored Jan 30, 2025
2 parents 1ad214e + f59e024 commit cf0606d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/stirling/software/SPDF/utils/GeneralUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,10 @@ private static List<Integer> handlePart(String part, int totalPages, int offset)
String[] rangeParts = part.split("-");
try {
int start = Integer.parseInt(rangeParts[0]);
int end = Integer.parseInt(rangeParts[1]);
int end =
(rangeParts.length > 1 && !rangeParts[1].isEmpty())
? Integer.parseInt(rangeParts[1])
: totalPages;
for (int i = start; i <= end; i++) {
if (i >= 1 && i <= totalPages) {
partResult.add(i - 1 + offset);
Expand Down

0 comments on commit cf0606d

Please sign in to comment.