Commit 1861c216 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Fix _splitpath and _wsplitpath implementation.

parent 0f900535
...@@ -831,8 +831,8 @@ do_error: ...@@ -831,8 +831,8 @@ do_error:
void CDECL _splitpath(const char *inpath, char *drv, char *dir, void CDECL _splitpath(const char *inpath, char *drv, char *dir,
char *fname, char *ext) char *fname, char *ext)
{ {
_splitpath_s(inpath, drv, MSVCRT__MAX_DRIVE, dir, MSVCRT__MAX_DIR, _splitpath_s(inpath, drv, drv?MSVCRT__MAX_DRIVE:0, dir, dir?MSVCRT__MAX_DIR:0,
fname, MSVCRT__MAX_FNAME, ext, MSVCRT__MAX_EXT); fname, fname?MSVCRT__MAX_FNAME:0, ext, ext?MSVCRT__MAX_EXT:0);
} }
/****************************************************************** /******************************************************************
...@@ -925,8 +925,8 @@ do_error: ...@@ -925,8 +925,8 @@ do_error:
void CDECL _wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, MSVCRT_wchar_t *dir, void CDECL _wsplitpath(const MSVCRT_wchar_t *inpath, MSVCRT_wchar_t *drv, MSVCRT_wchar_t *dir,
MSVCRT_wchar_t *fname, MSVCRT_wchar_t *ext) MSVCRT_wchar_t *fname, MSVCRT_wchar_t *ext)
{ {
_wsplitpath_s(inpath, drv, MSVCRT__MAX_DRIVE, dir, MSVCRT__MAX_DIR, _wsplitpath_s(inpath, drv, drv?MSVCRT__MAX_DRIVE:0, dir, dir?MSVCRT__MAX_DIR:0,
fname, MSVCRT__MAX_FNAME, ext, MSVCRT__MAX_EXT); fname, fname?MSVCRT__MAX_FNAME:0, ext, ext?MSVCRT__MAX_EXT:0);
} }
/********************************************************************* /*********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment