mirror of
https://github.com/reactos/reactos.git
synced 2024-12-30 19:14:31 +00:00
Merged with wine. (Fixed const string handling)
svn path=/trunk/; revision=10827
This commit is contained in:
parent
b7cf80521b
commit
5a1180477c
1 changed files with 12 additions and 10 deletions
|
@ -91,6 +91,8 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp
|
|||
WCHAR tmpEnvBuff[MAX_PATH];
|
||||
WCHAR* tmpE = tmpEnvBuff;
|
||||
DWORD envRet;
|
||||
static const WCHAR wszSPerc[] = {'%','s','%','%',0};
|
||||
static const WCHAR wszPerc[] = {'%',0};
|
||||
|
||||
TRACE("%p, %d, %s, %s, %p, %p\n", out, len, debugstr_w(fmt),
|
||||
debugstr_w(lpFile), pidl, args);
|
||||
|
@ -189,8 +191,8 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp
|
|||
* Check if this is a env-variable here...
|
||||
*/
|
||||
|
||||
// Make sure that we have at least one more %.
|
||||
if (strstrW(fmt, L"%"))
|
||||
/* Make sure that we have at least one more %.*/
|
||||
if (strstrW(fmt, wszPerc))
|
||||
{
|
||||
while (*fmt != '%')
|
||||
*tmpB++ = *fmt++;
|
||||
|
@ -202,16 +204,16 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp
|
|||
if (envRet == 0 || envRet > MAX_PATH)
|
||||
{
|
||||
TRACE("The env. var can't be found or is bigger than MAX_PATH => useless.");
|
||||
res += sprintfW(res, L"%s%%", tmpBuffer);
|
||||
res += sprintfW(res, wszSPerc, tmpBuffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
TRACE("Found it %s. Replacing... \n", debugstr_w(tmpEnvBuff));
|
||||
res += sprintfW(res, L"%s", tmpEnvBuff);
|
||||
res += sprintfW(res, wszSPerc, tmpEnvBuff);
|
||||
}
|
||||
}
|
||||
|
||||
} // switch
|
||||
} /* switch */
|
||||
|
||||
|
||||
fmt++;
|
||||
|
|
Loading…
Reference in a new issue