From fe7f05e71730eec7da35cbfec59d520ddd430bfd Mon Sep 17 00:00:00 2001 From: Themaister Date: Sun, 25 Dec 2011 12:14:26 +0100 Subject: [PATCH] Style nit. --- file.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/file.c b/file.c index 7a4a38e778..e4ec0a6fcb 100644 --- a/file.c +++ b/file.c @@ -985,11 +985,12 @@ bool path_file_exists(const char *path) void fill_pathname(char *out_path, const char *in_path, const char *replace, size_t size) { char tmp_path[MAXPATHLEN]; - + ssnes_assert(strlcpy(tmp_path, in_path, sizeof(tmp_path)) < sizeof(tmp_path)); char *tok = strrchr(tmp_path, '.'); if (tok != NULL) *tok = '\0'; + ssnes_assert(strlcpy(out_path, tmp_path, size) < size); ssnes_assert(strlcat(out_path, replace, size) < size); } @@ -1002,8 +1003,8 @@ void fill_pathname_noext(char *out_path, const char *in_path, const char *replac void fill_pathname_dir(char *in_dir, const char *in_basename, const char *replace, size_t size) { - ssnes_assert(strlcat(in_dir, "/", size) < size); - + ssnes_assert(strlcat(in_dir, "/", size) < size); + const char *base = strrchr(in_basename, '/'); if (!base) base = strrchr(in_basename, '\\');