mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:43:04 +00:00
[SHELL-EXPERIMENTS]
* Sync up to trunk head (r64124). svn path=/branches/shell-experiments/; revision=64126
This commit is contained in:
commit
18a81d5d1e
480 changed files with 54949 additions and 9004 deletions
|
@ -57,12 +57,6 @@ _sxprintf(
|
|||
int result;
|
||||
FILE stream;
|
||||
|
||||
/* Check trivial case */
|
||||
if ((buffer == NULL) && (count == 0) && (sizeOfBuffer == 0))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if IS_SECAPI
|
||||
/* Validate parameters */
|
||||
if (MSVCRT_CHECK_PMT(((buffer == NULL) || (format == NULL) || (sizeOfBuffer <= 0))))
|
||||
|
@ -118,7 +112,8 @@ _sxprintf(
|
|||
buffer[result] = _T('\0');
|
||||
#else
|
||||
/* Only zero terminate if there is enough space left */
|
||||
if (stream._cnt >= sizeof(TCHAR)) *(TCHAR*)stream._ptr = _T('\0');
|
||||
if ((stream._cnt >= sizeof(TCHAR)) && (stream._ptr))
|
||||
*(TCHAR*)stream._ptr = _T('\0');
|
||||
#endif
|
||||
|
||||
return result;
|
||||
|
|
|
@ -227,6 +227,11 @@ static
|
|||
int
|
||||
streamout_char(FILE *stream, int chr)
|
||||
{
|
||||
#ifdef _LIBCNT_
|
||||
if ((stream->_flag & _IOSTRG) && (!stream->_ptr))
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
#if defined(_USER32_WSPRINTF) || defined(_LIBCNT_)
|
||||
/* Check if the buffer is full */
|
||||
if (stream->_cnt < sizeof(TCHAR))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue