summaryrefslogtreecommitdiff
path: root/romdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'romdb.c')
-rw-r--r--romdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/romdb.c b/romdb.c
index 149814c..7fba5ef 100644
--- a/romdb.c
+++ b/romdb.c
@@ -418,7 +418,7 @@ char *get_header_name(uint8_t *rom)
}
} else {
last++;
- char *ret = malloc(last - (rom + TITLE_START) + 1);
+ char *ret = malloc(last - src + 1);
uint8_t *dst;
uint8_t last_was_space = 1;
for (dst = ret; src < last; src++)