diff --git a/source/arm11/atp.c b/source/arm11/atp.c index 8305a99..672c107 100644 --- a/source/arm11/atp.c +++ b/source/arm11/atp.c @@ -336,7 +336,7 @@ atp_error_t atp_select( atp_text_t title, atp_counter_t cnt, atp_itemprovider_t // 更新item_sel item_sel = idx_top + item_sel % CONTAINER_MAX_LINES; - if( item_sel >= cnt ) item_sel = cnt-1; + if( item_sel >= (int)cnt ) item_sel = cnt-1; // 更新view REFRESH_PAGE; diff --git a/source/arm11/filebrowser.c b/source/arm11/filebrowser.c index c817bd4..91aa8ca 100644 --- a/source/arm11/filebrowser.c +++ b/source/arm11/filebrowser.c @@ -178,7 +178,7 @@ Result browseFiles(const char *const basePath, char selected[512]) atp_error_t error; const u32 count = dList->num; if( count > 0 ) - error = atp_select( curDir, count, display_folder, NULL, (atp_callerdata_t)dList, value ); + error = atp_select( curDir, count, display_folder, NULL, (atp_callerdata_t)dList, &value ); else error = atp_show( 1, display_empty, NULL ); u32 pathLen = strlen(curDir); @@ -197,7 +197,7 @@ Result browseFiles(const char *const basePath, char selected[512]) else { const char *fname = &dList->ptrs[value][1]; - u32 namelen = strlen( &fname ) + 1; + u32 namelen = strlen( fname ) + 1; if( namelen + pathLen > DIRBUFFSIZE-1 ) { res = RES_OUT_OF_MEM;