Skip to content

Commit

Permalink
fixed major memory issue. added debug mode to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
ecpre committed Mar 4, 2023
1 parent 49ac489 commit 472186a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion FuseRedSea.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void redsea_read_files(struct redsea_directory* directory, unsigned char *path_s
if (directory_count+1 >= max_directory_count) {
expand_directory_array();
}
directory_paths[directory_count] = malloc(strlen(path));
directory_paths[directory_count] = malloc(strlen(path)+1);
strcpy(directory_paths[directory_count], path);
struct redsea_directory* directory_entry = malloc(sizeof(struct redsea_directory));
strcpy(directory_entry->name, name);
Expand Down
2 changes: 2 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
redseabuild:
gcc -I/usr/include/fuse -lfuse FuseRedSea.c -o redsea
debug:
gcc -Wall -g -O0 -I/usr/include/fuse -lfuse FuseRedSea.c -o redsea

all: redseabuild

0 comments on commit 472186a

Please sign in to comment.