Skip to content

Commit 2a82266

Browse files
authored
Fix inverted logic in main filesystem loop example (#33)
The main loop logic incorrectly opens non-directories instead of directories.
1 parent dd10e8c commit 2a82266

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • filesystem/directory/isfs/source

filesystem/directory/isfs/source/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ int main(int argc, char** argv) {
383383
selected_index = parent.childCount-1;
384384
else
385385
selected_index++;
386-
} if((pressed & WPAD_BUTTON_A) && !IsDir(&(parent.children[selected_index]))) {
386+
} if((pressed & WPAD_BUTTON_A) && IsDir(&(parent.children[selected_index]))) {
387387
// Check for . and .. on parent.children[selected_index].name
388388
if (strcmp(parent.children[selected_index].name, "..") == 0) {
389389
// Chop off the last directory if it's ".."

0 commit comments

Comments
 (0)