summaryrefslogtreecommitdiff
path: root/src/pdf_view.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf_view.zig')
-rw-r--r--src/pdf_view.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pdf_view.zig b/src/pdf_view.zig
index 58dd2c3c..8f842cde 100644
--- a/src/pdf_view.zig
+++ b/src/pdf_view.zig
@@ -2763,6 +2763,7 @@ pub const SectionRows = if (enabled) struct {
for (entries, 0..) |entry, ordinal| {
const resolved = ordinals[ordinal];
if (resolved == std.math.maxInt(usize)) continue;
+ // unreachable: resolveOrdinals resolves only to usable destinations
const destination = usableDestination(entries[resolved].destination) orelse unreachable;
total += switch (destination) {
.internal => |internal| std.fmt.count("{s}:{d}:{d} ", .{ target, internal.page + 1, ordinal + 1 }),
@@ -2777,6 +2778,7 @@ pub const SectionRows = if (enabled) struct {
for (entries, 0..) |entry, ordinal| {
const resolved = ordinals[ordinal];
if (resolved == std.math.maxInt(usize)) continue;
+ // unreachable: resolveOrdinals resolves only to usable destinations
const destination = usableDestination(entries[resolved].destination) orelse unreachable;
const prefix = switch (destination) {
.internal => |internal| try std.fmt.bufPrint(out[at..], "{s}:{d}:{d} ", .{ target, internal.page + 1, ordinal + 1 }),