This commit is contained in:
d0k3 2018-01-22 23:17:45 +01:00
parent 3d405166c5
commit 67222429b4

View File

@ -1905,8 +1905,6 @@ u32 GodMode(int entrypoint) {
ClearScreenF(true, true, COLOR_STD_BG); // clear splash ClearScreenF(true, true, COLOR_STD_BG); // clear splash
while (godmode9) { // this is the main loop while (godmode9) { // this is the main loop
int curr_drvtype = DriveType(current_path);
// basic sanity checking // basic sanity checking
if (!current_dir->n_entries) { // current dir is empty -> revert to root if (!current_dir->n_entries) { // current dir is empty -> revert to root
ShowPrompt(false, "Invalid directory object"); ShowPrompt(false, "Invalid directory object");
@ -1922,6 +1920,8 @@ u32 GodMode(int entrypoint) {
} }
if (cursor >= current_dir->n_entries) // cursor beyond allowed range if (cursor >= current_dir->n_entries) // cursor beyond allowed range
cursor = current_dir->n_entries - 1; cursor = current_dir->n_entries - 1;
int curr_drvtype = DriveType(current_path);
DirEntry* curr_entry = &(current_dir->entry[cursor]); DirEntry* curr_entry = &(current_dir->entry[cursor]);
if ((mark_next >= 0) && (curr_entry->type != T_DOTDOT)) { if ((mark_next >= 0) && (curr_entry->type != T_DOTDOT)) {
curr_entry->marked = mark_next; curr_entry->marked = mark_next;