- Fixed _(w)makepath.

svn path=/trunk/; revision=5465
This commit is contained in:
Hartmut Birr 2003-08-08 00:46:20 +00:00
parent ee25eea496
commit 8996ac2b8f
2 changed files with 8 additions and 6 deletions

View file

@ -1,4 +1,4 @@
/* $Id: makepath.c,v 1.11 2003/07/11 21:58:09 royce Exp $
/* $Id: makepath.c,v 1.12 2003/08/08 00:46:20 hbirr Exp $
*/
#include <msvcrt/stdlib.h>
#include <msvcrt/string.h>
@ -11,8 +11,9 @@ void _makepath(char* path, const char* drive, const char* dir, const char* fname
int dir_len;
if ((drive != NULL) && (*drive)) {
strcpy(path, drive);
strcat(path, ":");
path[0] = *drive;
path[1] = ':';
path[2] = 0;
} else {
(*path)=0;
}

View file

@ -1,4 +1,4 @@
/* $Id: wmakpath.c,v 1.2 2003/07/11 21:58:09 royce Exp $
/* $Id: wmakpath.c,v 1.3 2003/08/08 00:46:20 hbirr Exp $
*/
#include <msvcrt/stdlib.h>
#include <msvcrt/string.h>
@ -12,8 +12,9 @@ void _wmakepath(wchar_t* path, const wchar_t* drive, const wchar_t* dir, const w
int dir_len;
if ((drive != NULL) && (*drive)) {
wcscpy(path, drive);
wcscat(path, L":");
path[0] = *drive;
path[1] = L':';
path[2] = 0;
} else {
(*path) = 0;
}