summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@code.google.com>2013-09-10 16:45:03 -0400
committerKurt Jung <kurt.w.jung@code.google.com>2013-09-10 16:45:03 -0400
commit601e5148b50411908b7dc6163f560f7cc62622e1 (patch)
tree1cbbac56ce0d2f6503032857d5a7d86c42a841d1
parent6d6d5abb32803aceb586b0d0b1b034ddda62bfb8 (diff)
Bruno Michel identified and fixed a problem with non-cp1252 encodings, specifically in the way differences with cp1252 are stored and accessed. Thanks, Bruno.
-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
}