From 0bda05395fbbb2d4c575180acca6ed9433968ee8 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Tue, 12 May 2009 12:58:50 +0000 Subject: Correctly calculate the offset of the end of file svn path=/trunk/tools/ttf2f/; revision=7481 --- src/outlines.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/outlines.c') diff --git a/src/outlines.c b/src/outlines.c index f66d10d..080a44b 100644 --- a/src/outlines.c +++ b/src/outlines.c @@ -153,6 +153,12 @@ ttf2f_result outlines_write(const char *savein, const char *name, } } + /* Finally, write offset to end of file */ + fseek(output, header.chunk_data.chunk_table_offset + + chunk_table_entry * 4, SEEK_SET); + if (fwrite(¤t_chunk_offset, sizeof(int), 1, output) != 1) + goto error_write; + fclose(output); #ifdef __riscos__ -- cgit v1.2.3