diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-05-13 01:51:54 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-05-13 01:51:54 +0000 |
commit | 965377a4087fd77d9aa4ddcf5d6b2c9bd3ac656b (patch) | |
tree | bd6f7bdbb9f3f941ffc7eb0cc0e1bf4dac4188e2 /src | |
parent | 6c62d6d24635134c542ee10a3fba6f30879bfe64 (diff) | |
download | ttf2f-965377a4087fd77d9aa4ddcf5d6b2c9bd3ac656b.tar.gz ttf2f-965377a4087fd77d9aa4ddcf5d6b2c9bd3ac656b.tar.bz2 |
Ensure final directory is created and destination path is NUL terminated.
svn path=/trunk/tools/ttf2f/; revision=7494
Diffstat (limited to 'src')
-rw-r--r-- | src/toolbox.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/toolbox.c b/src/toolbox.c index de62001..683571d 100644 --- a/src/toolbox.c +++ b/src/toolbox.c @@ -360,6 +360,16 @@ osbool convert_font(bits event_code, toolbox_action *event, *(save++) = *dot; } + *save = '\0'; + + error = xosfile_create_dir(save_in, 0); + if (error) { + fprintf(stderr, "os_file: 0x%x: %s\n", + error->errnum, error->errmess); + wimp_report_error(error, 0x5, "TTF2f"); + converting = 0; + return TRUE; + } ctx.face = open_font(ifilename); if (ctx.face == NULL) { |