last try to fix NULL bug

svn path=/trunk/; revision=16588
This commit is contained in:
Magnus Olsen 2005-07-15 18:25:03 +00:00
parent 8b10660c85
commit 8aa7fc3fb8

View file

@ -276,8 +276,10 @@ INT cmd_copy (LPTSTR cmd, LPTSTR param)
/* Get the envor value if it exists */
evar = malloc(512 * sizeof(TCHAR));
if (evar==NULL) size = 0;
else
{
size = GetEnvironmentVariable (_T("COPYCMD"), evar, 512);
}
if ((size > 1) && (size > 512))
{
evar = realloc(evar,size * sizeof(TCHAR) );