From 07adcf603f64294b144cdf2988be0231a6d6fb84 Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Tue, 16 Jan 2007 21:06:42 +0000 Subject: [PATCH] Bugfix: Seeking to the end of the file is legal, only reading from this position isn't. Fixes running TTFReader with K3.ttf. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@496860 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fonts/truetype/FontFileReader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/fonts/truetype/FontFileReader.java b/src/java/org/apache/fop/fonts/truetype/FontFileReader.java index 42049eaac..18ac7ad0f 100644 --- a/src/java/org/apache/fop/fonts/truetype/FontFileReader.java +++ b/src/java/org/apache/fop/fonts/truetype/FontFileReader.java @@ -82,7 +82,7 @@ public class FontFileReader { * @throws IOException In case of an I/O problem */ public void seekSet(long offset) throws IOException { - if (offset >= fsize || offset < 0) { + if (offset > fsize || offset < 0) { throw new java.io.EOFException("Reached EOF, file size=" + fsize + " offset=" + offset); } -- 2.39.5