summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-05-12 12:58:50 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-05-12 12:58:50 +0000
commit0bda05395fbbb2d4c575180acca6ed9433968ee8 (patch)
tree150f6ace954cb10e9707f23e563bb10f6a773b62 /src
parentaee4953df4779e2848ed25649c4485052a02a02d (diff)
downloadttf2f-0bda05395fbbb2d4c575180acca6ed9433968ee8.tar.gz
ttf2f-0bda05395fbbb2d4c575180acca6ed9433968ee8.tar.bz2
Correctly calculate the offset of the end of file
svn path=/trunk/tools/ttf2f/; revision=7481
Diffstat (limited to 'src')
-rw-r--r--src/outlines.c6
1 files changed, 6 insertions, 0 deletions
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(&current_chunk_offset, sizeof(int), 1, output) != 1)
+ goto error_write;
+
fclose(output);
#ifdef __riscos__