Minor stuff

This commit is contained in:
Aurora 2016-09-28 02:10:16 +02:00
parent a2e44e797d
commit e8a3e453fc
4 changed files with 4 additions and 6 deletions

5
.gitignore vendored
View File

@ -1,9 +1,10 @@
out out
build build
loader/build
loader/arm11/build
*.bin *.bin
*.3dsx *.3dsx
*.smdh *.smdh
*.o *.o
*.d *.d
*.elf *.elf
*.bat

View File

@ -23,8 +23,6 @@
#pragma once #pragma once
#include <stdint.h> #include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>
//Common data types //Common data types
typedef uint8_t u8; typedef uint8_t u8;

View File

@ -45,7 +45,7 @@ u32 fileRead(void *dest, const char *path, u32 maxSize)
if(f_open(&file, path, FA_READ) == FR_OK) if(f_open(&file, path, FA_READ) == FR_OK)
{ {
u32 size = f_size(&file); u32 size = f_size(&file);
if(!(size > maxSize)) if(!(maxSize > 0 && size > maxSize))
f_read(&file, dest, size, (unsigned int *)ret); f_read(&file, dest, size, (unsigned int *)ret);
f_close(&file); f_close(&file);
} }

View File

@ -9,7 +9,6 @@
#include "screen.h" #include "screen.h"
#include "draw.h" #include "draw.h"
#include "utils.h" #include "utils.h"
#include "cache.h"
#include "types.h" #include "types.h"
#include "fatfs/sdmmc/sdmmc.h" #include "fatfs/sdmmc/sdmmc.h"
#include "../build/bundled.h" #include "../build/bundled.h"