show key error upon mounting mmc and fix small files in hex view

This commit is contained in:
suchmememanyskill
2021-05-23 23:57:58 +02:00
parent bb4361c991
commit a1ae52e8ac
3 changed files with 8 additions and 10 deletions

View File

@@ -130,7 +130,7 @@ void HexView(char *path, FSEntry_t entry){
hidRead();
gfx_clearscreen();
print = malloc(2048);
print = calloc(2048, 1);
if ((res = f_open(&in, filePath, FA_READ | FA_OPEN_EXISTING))){
DrawError(newErrCode(res));
@@ -146,7 +146,7 @@ void HexView(char *path, FSEntry_t entry){
}
gfx_con_setpos(0, 31);
gfx_hexdump(offset * 32, print, size);
gfx_hexdump(offset * 32, print, ((size + 31) / 32) * 32);
input = hidRead();