From 2274f5cc8d3de6a4e1e4afd71aa47584df432c45 Mon Sep 17 00:00:00 2001 From: Evan Barger Date: Wed, 1 Apr 2020 20:51:35 -0400 Subject: [PATCH] strip null characters from rom title --- script/gbnp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script/gbnp.js b/script/gbnp.js index 5555e06..7ad1a27 100644 --- a/script/gbnp.js +++ b/script/gbnp.js @@ -61,8 +61,8 @@ class ROM { let file = new FileSeeker(arrayBuffer); file.seek(0x134); - this.title = String.fromCharCode(...file.read(0xF)); - this.menuText = this.title.replace(/\0/g, ''); + this.title = String.fromCharCode(...file.read(0xF)).replace(/\0/g, ''); + this.menuText = this.title; file.seek(0x143); let cgbByte = file.readByte();