fix functions not returning values (#1926)

This commit is contained in:
Jcw87
2023-09-15 04:15:46 -07:00
committed by GitHub
parent 7efadec3bd
commit ea7ec50d8f
7 changed files with 19 additions and 11 deletions
+11 -5
View File
@@ -1422,17 +1422,23 @@ void dName_c::NameStrSet() {
/* 80251048-80251094 24B988 004C+00 6/6 0/0 0/0 .text getMenuPosIdx__7dName_cFUc */
s32 dName_c::getMenuPosIdx(u8 selPos) {
s32 result;
switch (selPos) {
case 0:
return 0;
result = 0;
break;
case 1:
return 1;
result = 1;
break;
case 2:
return 2;
result = 2;
break;
case 3:
return 3;
result = 3;
break;
}
//!@bug UB: no default return
return result;
//!@bug UB: uninitialized default return
}
/* 80251094-8025115C 24B9D4 00C8+00 1/0 0/0 0/0 .text draw__14dDlst_NameIN_cFv */