mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:45:50 +00:00
Unicode fixes and error checking.
svn path=/trunk/; revision=22690
This commit is contained in:
parent
cdbfb24b12
commit
410ae9c26b
1 changed files with 11 additions and 2 deletions
|
@ -275,8 +275,17 @@ BOOL Batch (LPTSTR fullname, LPTSTR firstword, LPTSTR param)
|
||||||
//
|
//
|
||||||
// Allocate enough memory to hold the params and copy them over without modifications
|
// Allocate enough memory to hold the params and copy them over without modifications
|
||||||
//
|
//
|
||||||
bc->raw_params = malloc(_tcslen(param));
|
bc->raw_params = malloc((_tcslen(param)+1) * sizeof(TCHAR));
|
||||||
_tcscpy(bc->raw_params,param);
|
if (bc->raw_params != NULL)
|
||||||
|
{
|
||||||
|
memset (bc->raw_params, 0, _tcslen(bc->raw_params) * sizeof(TCHAR));
|
||||||
|
_tcscpy(bc->raw_params,param);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
error_out_of_memory();
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
DebugPrintf (_T("Batch: returns TRUE\n"));
|
DebugPrintf (_T("Batch: returns TRUE\n"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue