Ignore:
Timestamp:
Apr 26, 2001, 7:01:58 PM (24 years ago)
Author:
sandervl
Message:

GetEnvironmentVariableW fix (breakpoint hit in debug build)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/environ.cpp

    r5481 r5596  
    1 /* $Id: environ.cpp,v 1.10 2001-04-05 05:54:51 sandervl Exp $ */
     1/* $Id: environ.cpp,v 1.11 2001-04-26 17:01:58 sandervl Exp $ */
    22
    33/*
     
    134134  DWORD rc;
    135135
     136  if (!lpName || !*lpName)
     137  {
     138      dprintf(("GetEnvironmentVariableW: invalid name!"));
     139      SetLastError(ERROR_INVALID_PARAMETER);
     140      return 0;
     141  }
     142
    136143  if(nSize) {
    137144       asciibuffer = (char *)malloc(nSize+1);
     
    143150
    144151  rc = CALL_ODINFUNC(GetEnvironmentVariableA)(astring, asciibuffer, nSize);
    145   AsciiToUnicode(asciibuffer, lpBuffer);
     152  if(asciibuffer)
     153      AsciiToUnicode(asciibuffer, lpBuffer);
    146154  FreeAsciiString(astring);
    147155  if(asciibuffer)
Note: See TracChangeset for help on using the changeset viewer.