Changeset 363 for libmpc/trunk/win32/basename.c
- Timestamp:
- 11/23/07 17:39:02 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libmpc/trunk/win32/basename.c
r362 r363 48 48 * in which to create a wide character reference copy of path 49 49 */ 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)); 52 54 53 55 /* create the wide character reference copy of path, … … 55 57 */ 56 58 57 wchar_t *refpath = refcopy;59 refpath = refcopy; 58 60 if( ((len = mbstowcs( refpath, path, len )) > 1) && (refpath[1] == L':') ) 59 61 { … … 142 144 } 143 145 146 free(refcopy); 144 147 /* or we had an empty residual path name, after the drive designator, 145 148 * in which case we simply fall through ...
Note: See TracChangeset
for help on using the changeset viewer.