mirror of
https://github.com/reactos/reactos.git
synced 2025-07-14 09:34:13 +00:00
Fixed a bug, that will add a '.' when the ext string is empty.
svn path=/trunk/; revision=2247
This commit is contained in:
parent
5ee0bf283e
commit
1689533ef4
2 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
/* $Id: makepath.c,v 1.7 2001/09/09 12:13:14 hbirr Exp $
|
||||||
|
*/
|
||||||
#include <crtdll/stdlib.h>
|
#include <crtdll/stdlib.h>
|
||||||
#include <crtdll/string.h>
|
#include <crtdll/string.h>
|
||||||
|
|
||||||
|
@ -24,7 +26,7 @@ void _makepath(char *path, const char *drive, const char *dir, const char *fname
|
||||||
if (fname != NULL)
|
if (fname != NULL)
|
||||||
{
|
{
|
||||||
strcat(path, fname);
|
strcat(path, fname);
|
||||||
if (ext != NULL)
|
if (ext != NULL && *ext != 0)
|
||||||
{
|
{
|
||||||
if (*ext != '.')
|
if (*ext != '.')
|
||||||
strcat(path, ".");
|
strcat(path, ".");
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* $Id: makepath.c,v 1.7 2001/09/09 12:13:15 hbirr Exp $
|
||||||
|
*/
|
||||||
#include <msvcrt/stdlib.h>
|
#include <msvcrt/stdlib.h>
|
||||||
#include <msvcrt/string.h>
|
#include <msvcrt/string.h>
|
||||||
|
|
||||||
|
@ -24,7 +26,7 @@ void _makepath(char *path, const char *drive, const char *dir, const char *fname
|
||||||
if (fname != NULL)
|
if (fname != NULL)
|
||||||
{
|
{
|
||||||
strcat(path, fname);
|
strcat(path, fname);
|
||||||
if (ext != NULL)
|
if (ext != NULL && *ext != 0)
|
||||||
{
|
{
|
||||||
if (*ext != '.')
|
if (*ext != '.')
|
||||||
strcat(path, ".");
|
strcat(path, ".");
|
||||||
|
@ -57,7 +59,7 @@ void _wmakepath(wchar_t *path, const wchar_t *drive, const wchar_t *dir, const w
|
||||||
if (fname != NULL)
|
if (fname != NULL)
|
||||||
{
|
{
|
||||||
wcscat(path, fname);
|
wcscat(path, fname);
|
||||||
if (ext != NULL)
|
if (ext != NULL && *ext != 0)
|
||||||
{
|
{
|
||||||
if (*ext != L'.')
|
if (*ext != L'.')
|
||||||
wcscat(path, L".");
|
wcscat(path, L".");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue