changeset 1031:219de1d64aa1

Fixed a bug in get_header_name that results in a crash if the "International Name" field is blank
author Michael Pavone <pavone@retrodev.com>
date Sun, 15 May 2016 12:10:49 -0700
parents c7c573f0229e
children 679137a0e78e
files romdb.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/romdb.c	Sun May 15 12:02:56 2016 -0700
+++ b/romdb.c	Sun May 15 12:10:49 2016 -0700
@@ -418,7 +418,7 @@
 			}
 		} 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++)