Ignore:
Timestamp:
11/23/07 17:39:02 (16 years ago)
Author:
r2d
Message:
  • corrections to compile with msvc c (c89?)
  • removed headers from other lib
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/win32/basename.c

    r362 r363  
    4848     * in which to create a wide character reference copy of path
    4949     */
    50 
    51     wchar_t refcopy[1 + (len = mbstowcs( NULL, path, 0 ))];
     50         
     51    wchar_t * refcopy, * refpath;
     52    len = mbstowcs( NULL, path, 0 );
     53    refcopy = malloc((1 + len) * sizeof(wchar_t));
    5254
    5355    /* create the wide character reference copy of path,
     
    5557     */
    5658
    57     wchar_t *refpath = refcopy;
     59    refpath = refcopy;
    5860    if( ((len = mbstowcs( refpath, path, len )) > 1) && (refpath[1] == L':') )
    5961    {
     
    142144    }
    143145
     146    free(refcopy);
    144147    /* or we had an empty residual path name, after the drive designator,
    145148     * in which case we simply fall through ...
Note: See TracChangeset for help on using the changeset viewer.