summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdf.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdf.go b/fpdf.go
index 51dfad1..850dc1e 100644
--- a/fpdf.go
+++ b/fpdf.go
@@ -1216,8 +1216,8 @@ func (f *Fpdf) AddFont(familyStr, styleStr, fileStr string) {
}
}
if n < 0 {
- n = len(f.diffs) + 1
- f.diffs[n] = info.Diff
+ f.diffs = append(f.diffs, info.Diff)
+ n = len(f.diffs)
}
info.DiffN = n
}