diff options
Diffstat (limited to 'easydir.c')
-rw-r--r-- | easydir.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -14,9 +14,9 @@ char* splitPath(char *source, char *path, char *file) { int fSymbol = 0, f = 0; - char *main_path = malloc(sizeof(char) * strlen(source) + 1); - char *file_path = malloc(sizeof(char) * strlen(source) + 1); - + char *main_path = malloc( sizeof(char) * (strlen(source)+1) ); + char *file_path = malloc( sizeof(char) * (strlen(source)+1) ); + for(int i=0; i < strlen(source); i++) { if(fSymbol == 1) |