[libbluray-devel] Fix win32_get_font_dir not appending the actual font file to path
tourettes
git at videolan.org
Mon Dec 1 22:29:39 CET 2014
libbluray | branch: master | tourettes <tourettes at team-mediaportal.com> | Mon Dec 1 23:00:24 2014 +0200| [37e87e3d33867d27194dbf9dd29474d49f9202e1] | committer: hpi1
Fix win32_get_font_dir not appending the actual font file to path
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=37e87e3d33867d27194dbf9dd29474d49f9202e1
---
src/file/dirs_win32.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/file/dirs_win32.c b/src/file/dirs_win32.c
index dcce076..c581a48 100644
--- a/src/file/dirs_win32.c
+++ b/src/file/dirs_win32.c
@@ -54,8 +54,8 @@ char *win32_get_font_dir(const char *font_file)
int len = WideCharToMultiByte (CP_UTF8, 0, wdir, -1, NULL, 0, NULL, NULL);
char *path = malloc(len + strlen(font_file) + 2);
WideCharToMultiByte(CP_UTF8, 0, wdir, -1, path, len, NULL, NULL);
- path[len] = '\\';
- strcpy(path + len + 1, font_file);
+ path[len - 1] = '\\';
+ strcpy(path + len, font_file);
return path;
}
More information about the libbluray-devel
mailing list