[syslinux:elflink] font: increment pointer to fontbuf by font height

syslinux-bot for Matt Fleming matt.fleming at intel.com
Wed May 29 06:09:11 PDT 2013


Commit-ID:  5c04bb1ad89553c1541a527bf105a86e3a31e1a5
Gitweb:     http://www.syslinux.org/commit/5c04bb1ad89553c1541a527bf105a86e3a31e1a5
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Wed, 29 May 2013 13:56:02 +0100
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Wed, 29 May 2013 13:56:02 +0100

font: increment pointer to fontbuf by font height

Instead of always assuming that the font height is 32 bytes, use
hdr.height to increment our fontbuf pointer. hdr.height is the size of
the chunks we read from the .psf file.

Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 core/font.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/font.c b/core/font.c
index 8533080..113b004 100644
--- a/core/font.c
+++ b/core/font.c
@@ -75,7 +75,7 @@ __export void loadfont(const char *filename)
 	for (i = 0; i < 256; i++) {
 		if (_fread(p, hdr.height, f) != hdr.height)
 			goto fail;
-		p += 32;
+		p += hdr.height;
 	}
 
 	/* Loaded OK */


More information about the Syslinux-commits mailing list