Mercurial > repos > blastem
comparison romdb.c @ 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 | 5fb64487b6e1 |
children | 9a74eb24e53c |
comparison
equal
deleted
inserted
replaced
1030:c7c573f0229e | 1031:219de1d64aa1 |
---|---|
416 } else { | 416 } else { |
417 return strdup("UNKNOWN"); | 417 return strdup("UNKNOWN"); |
418 } | 418 } |
419 } else { | 419 } else { |
420 last++; | 420 last++; |
421 char *ret = malloc(last - (rom + TITLE_START) + 1); | 421 char *ret = malloc(last - src + 1); |
422 uint8_t *dst; | 422 uint8_t *dst; |
423 uint8_t last_was_space = 1; | 423 uint8_t last_was_space = 1; |
424 for (dst = ret; src < last; src++) | 424 for (dst = ret; src < last; src++) |
425 { | 425 { |
426 if (*src >= 0x20 && *src < 0x80) { | 426 if (*src >= 0x20 && *src < 0x80) { |