diff --git a/source/crypto.c b/source/crypto.c index 21968f5..ed0f3a7 100755 --- a/source/crypto.c +++ b/source/crypto.c @@ -469,7 +469,7 @@ void kernel9Loader(Arm9Bin *arm9Section) //Calculate the size of the ARM9 binary u32 arm9BinSize = 0; //http://stackoverflow.com/questions/12791077/atoi-implementation-in-c - for(u8 *tmp = arm9Section->size; *tmp != 0; tmp++) + for(char *tmp = arm9Section->size; *tmp != 0; tmp++) arm9BinSize = (arm9BinSize << 3) + (arm9BinSize << 1) + *tmp - '0'; //Decrypt ARM9 binary diff --git a/source/crypto.h b/source/crypto.h index 78696a8..a3b958c 100755 --- a/source/crypto.h +++ b/source/crypto.h @@ -164,7 +164,7 @@ typedef struct Arm9Bin { uint8_t keyX[0x10]; uint8_t keyY[0x10]; uint8_t ctr[0x10]; - uint8_t size[8]; + char size[8]; uint8_t reserved[8]; uint8_t ctlBlock[0x10]; char magic[4];