Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion workspace/all/nextui/nextui.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,10 +1451,14 @@ static void openDirectory(char* path, int auto_launch) {
Array_push(stack, top);
}
else {
// keep a copy of path, which might be a reference into stack which is about to be freed
char temp_path[256];
strcpy(temp_path, path);

// construct a fresh stack by walking upwards until SDCARD_ROOT
DirectoryArray_free(stack);

stack = pathToStack(path);
stack = pathToStack(temp_path);
top = stack->items[stack->count - 1];
}
}
Expand Down
Loading