From 1689533ef4e8ca7f4767ff8fd6835b8972ab5ac7 Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Sun, 9 Sep 2001 12:13:15 +0000 Subject: [PATCH] Fixed a bug, that will add a '.' when the ext string is empty. svn path=/trunk/; revision=2247 --- reactos/lib/crtdll/stdlib/makepath.c | 4 +++- reactos/lib/msvcrt/stdlib/makepath.c | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/reactos/lib/crtdll/stdlib/makepath.c b/reactos/lib/crtdll/stdlib/makepath.c index 1802f29e5a1..406422af5ab 100644 --- a/reactos/lib/crtdll/stdlib/makepath.c +++ b/reactos/lib/crtdll/stdlib/makepath.c @@ -1,3 +1,5 @@ +/* $Id: makepath.c,v 1.7 2001/09/09 12:13:14 hbirr Exp $ + */ #include #include @@ -24,7 +26,7 @@ void _makepath(char *path, const char *drive, const char *dir, const char *fname if (fname != NULL) { strcat(path, fname); - if (ext != NULL) + if (ext != NULL && *ext != 0) { if (*ext != '.') strcat(path, "."); diff --git a/reactos/lib/msvcrt/stdlib/makepath.c b/reactos/lib/msvcrt/stdlib/makepath.c index 314327bc36d..2aeb9fe648c 100644 --- a/reactos/lib/msvcrt/stdlib/makepath.c +++ b/reactos/lib/msvcrt/stdlib/makepath.c @@ -1,3 +1,5 @@ +/* $Id: makepath.c,v 1.7 2001/09/09 12:13:15 hbirr Exp $ + */ #include #include @@ -24,7 +26,7 @@ void _makepath(char *path, const char *drive, const char *dir, const char *fname if (fname != NULL) { strcat(path, fname); - if (ext != NULL) + if (ext != NULL && *ext != 0) { if (*ext != '.') strcat(path, "."); @@ -57,7 +59,7 @@ void _wmakepath(wchar_t *path, const wchar_t *drive, const wchar_t *dir, const w if (fname != NULL) { wcscat(path, fname); - if (ext != NULL) + if (ext != NULL && *ext != 0) { if (*ext != L'.') wcscat(path, L".");