* 24-Jan-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
* Fixed Win32 environment handling.
* Unicode and redirection safe!
+ *
+ * 25-Feb-1999 (Eric Kohl <ekohl@abo.rhein-zeitung.de>)
+ * Fixed little bug.
*/
-#define WIN32_LEAN_AND_MEAN
-
#include "config.h"
#ifdef INCLUDE_CMD_SET
#include "cmd.h"
-/* size of environment variable buffer */
+/* initial size of environment variable buffer */
#define ENV_BUFFER_SIZE 1024
lpOutput += (len + 1);
}
}
- FreeEnvironmentStrings (lpEnv);
+ FreeEnvironmentStrings (lpEnv);
}
return 0;
else if (dwBuffer > ENV_BUFFER_SIZE)
{
pszBuffer = (LPTSTR)realloc (pszBuffer, dwBuffer * sizeof (TCHAR));
- GetEnvironmentVariable (param, pszBuffer, ENV_BUFFER_SIZE);
+ GetEnvironmentVariable (param, pszBuffer, dwBuffer * sizeof (TCHAR));
}
ConOutPrintf ("%s\n", pszBuffer);