mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +00:00
[WINESYNC] wininet: Use _ltow instead of sprintf for port number in InternetCreateUrl.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 9fe900532eb310d114c04d15a8d0b986ec831552 by Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
parent
6d133af41e
commit
9b564981ba
2 changed files with 7 additions and 8 deletions
|
@ -4280,9 +4280,10 @@ static BOOL calc_url_length(LPURL_COMPONENTSW lpUrlComponents,
|
||||||
|
|
||||||
if (!url_uses_default_port(nScheme, lpUrlComponents->nPort))
|
if (!url_uses_default_port(nScheme, lpUrlComponents->nPort))
|
||||||
{
|
{
|
||||||
char szPort[MAX_WORD_DIGITS+1];
|
WCHAR port[MAX_WORD_DIGITS + 1];
|
||||||
|
|
||||||
*lpdwUrlLength += sprintf(szPort, "%d", lpUrlComponents->nPort);
|
_ltow(lpUrlComponents->nPort, port, 10);
|
||||||
|
*lpdwUrlLength += lstrlenW(port);
|
||||||
*lpdwUrlLength += strlen(":");
|
*lpdwUrlLength += strlen(":");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4438,10 +4439,8 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags,
|
||||||
{
|
{
|
||||||
DWORD dwLen;
|
DWORD dwLen;
|
||||||
INTERNET_SCHEME nScheme;
|
INTERNET_SCHEME nScheme;
|
||||||
WCHAR *start = lpszUrl;
|
|
||||||
|
|
||||||
static const WCHAR slashSlashW[] = {'/','/'};
|
static const WCHAR slashSlashW[] = {'/','/'};
|
||||||
static const WCHAR fmtW[] = {'%','u',0};
|
|
||||||
|
|
||||||
TRACE("(%p,%d,%p,%p)\n", lpUrlComponents, dwFlags, lpszUrl, lpdwUrlLength);
|
TRACE("(%p,%d,%p,%p)\n", lpUrlComponents, dwFlags, lpszUrl, lpdwUrlLength);
|
||||||
|
|
||||||
|
@ -4526,9 +4525,9 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags,
|
||||||
|
|
||||||
if (!url_uses_default_port(nScheme, lpUrlComponents->nPort))
|
if (!url_uses_default_port(nScheme, lpUrlComponents->nPort))
|
||||||
{
|
{
|
||||||
*lpszUrl = ':';
|
*lpszUrl++ = ':';
|
||||||
lpszUrl++;
|
_ltow(lpUrlComponents->nPort, lpszUrl, 10);
|
||||||
lpszUrl += swprintf(lpszUrl, *lpdwUrlLength - (lpszUrl - start), fmtW, lpUrlComponents->nPort);
|
lpszUrl += lstrlenW(lpszUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add slash between hostname and path if necessary */
|
/* add slash between hostname and path if necessary */
|
||||||
|
|
|
@ -5,4 +5,4 @@ files:
|
||||||
include/wininet.h: sdk/include/psdk/wininet.h
|
include/wininet.h: sdk/include/psdk/wininet.h
|
||||||
include/winineti.h: sdk/include/psdk/winineti.h
|
include/winineti.h: sdk/include/psdk/winineti.h
|
||||||
tags:
|
tags:
|
||||||
wine: aa384d36429110970aa72acbc5043158de6aff03
|
wine: 9fe900532eb310d114c04d15a8d0b986ec831552
|
||||||
|
|
Loading…
Reference in a new issue