Changeset 4964 for trunk/src


Ignore:
Timestamp:
Jan 18, 2001, 7:14:16 PM (25 years ago)
Author:
sandervl
Message:

MultiByteToWideChar & lstrcpynA bugfixes; added cdaudio system.ini section

Location:
trunk/src/kernel32
Files:
3 edited

Legend:

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

    r4664 r4964  
    1 /* $Id: heapstring.cpp,v 1.35 2000-11-21 14:10:08 sandervl Exp $ */
     1/* $Id: heapstring.cpp,v 1.36 2001-01-18 18:14:16 sandervl Exp $ */
    22
    33/*
     
    356356           arg2,
    357357           arg3));
     358
     359  if(arg3 == 0) {
     360    return NULL;
     361  }
    358362
    359363  //PH: looks like either \0 or arg3 terminate the copy
  • trunk/src/kernel32/initsystem.cpp

    r4946 r4964  
    1 /* $Id: initsystem.cpp,v 1.25 2001-01-14 17:16:54 sandervl Exp $ */
     1/* $Id: initsystem.cpp,v 1.26 2001-01-18 18:14:16 sandervl Exp $ */
    22/*
    33 * Odin system initialization (registry, directories & environment)
     
    101101#define DEVICE_GROUP_SCSICDROM  "SCSI CDROM Class"
    102102
     103const char szMci[] = "mci";
     104const char szCDAudio[] = "cdaudio";
     105const char szMciCDA[] = "mcicda.drv";
     106
    103107//******************************************************************************
    104108//******************************************************************************
     
    676680       PROFILE_SetOdinIniString(ODINFONTSECTION, "MS Sans Serif", "WarpSans");
    677681   }
    678 
     682   //Create system.ini with [mci] section
     683   strcpy(shellpath, InternalGetWindowsDirectoryA());
     684   strcat(shellpath, "\\system.ini");
     685   
     686   if(GetPrivateProfileStringA(szMci, szCDAudio, szMciCDA, &temp, 0, shellpath) <= 1) {
     687      WritePrivateProfileStringA(szMci, szCDAudio, szMciCDA, shellpath);
     688   }
    679689   return TRUE;
    680690
  • trunk/src/kernel32/unicode.cpp

    r3461 r4964  
    1 /* $Id: unicode.cpp,v 1.23 2000-04-29 18:26:59 sandervl Exp $ */
     1/* $Id: unicode.cpp,v 1.24 2001-01-18 18:14:16 sandervl Exp $ */
    22
    33/*
     
    8383
    8484    dprintf2(("MultiByteToWideChar: %d %x (%s %d) (%x %d)", page, flags, src, srclen, dst, dstlen));
     85
     86    if (!src || (!dst && dstlen))
     87    {
     88        SetLastError( ERROR_INVALID_PARAMETER );
     89        return 0;
     90    }
     91    //-1 means the input string is null terminated and we need to calculate
     92    //its length
    8593    if (srclen == -1)
    8694        srclen = lstrlenA(src)+1;
    87     if (!dstlen || !dst)
    88         return srclen;
     95
     96    if (!dstlen)
     97        return srclen;
    8998
    9099    ret = srclen;
Note: See TracChangeset for help on using the changeset viewer.