Changeset 257 in Main for trunk/Common/dir.c
- Timestamp:
- Oct 4, 2024, 2:34:27 PM (6 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/dir.c
r255 r257 38 38 do { 39 39 if(strcmp(ffd.cFileName, ".") != 0 && strcmp(ffd.cFileName, "..") != 0) { 40 old = r;41 for(i = 0; old[i] != NULL; i++)42 ;43 r = malloc(sizeof(*r) * (i + 2));44 for(i = 0; old[i] != NULL; i++) r[i] = old[i];45 r[i] = cm_strcat(ffd.cFileName, (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? "/" : "");46 r[i + 1] = NULL;47 free(old);40 old = r; 41 for(i = 0; old[i] != NULL; i++) 42 ; 43 r = malloc(sizeof(*r) * (i + 2)); 44 for(i = 0; old[i] != NULL; i++) r[i] = old[i]; 45 r[i] = cm_strcat(ffd.cFileName, (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? "/" : ""); 46 r[i + 1] = NULL; 47 free(old); 48 48 } 49 49 } while(FindNextFile(hfind, &ffd) != 0);
Note:
See TracChangeset
for help on using the changeset viewer.