summaryrefslogtreecommitdiff
path: root/src/red.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/red.c')
-rw-r--r--src/red.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/red.c b/src/red.c
index da9b5af..c152543 100644
--- a/src/red.c
+++ b/src/red.c
@@ -11,10 +11,11 @@
#include <stdio.h>
-void agb_red (void * const restrict buf, FILE * restrict rom)
+void
+agb_red (void * const restrict buf, FILE * restrict rom)
{
fseek (rom, agb_romsrt, SEEK_SET); // We only need to read the part of the ROM that is used for the checksum.
- size_t const num = agb_chksumoff+0x1u;
+ size_t const num = agb_sumoff + 0x1u;
if (fread (buf,0x1u, num, rom) != num) {
fputs ("Unable to read ROM\n", stderr);