shithub: rgbds

Download patch

ref: b2c1f6122eb5ed5a9070c8cf0450f0cf826f6edd
parent: a761e98e183c2a8479944d30a2e73d8b1fa4eb1d
author: Marcus Huderle <huderlem@gmail.com>
date: Sat May 18 12:48:43 EDT 2019

Properly set all 16 characters in ROM header title

--- a/src/fix/main.c
+++ b/src/fix/main.c
@@ -268,10 +268,7 @@
 		 * characters may conflict with the title.
 		 */
 
-		int n = snprintf((char *)header + 0x34, 16, "%s", title);
-
-		for (int i = 16; i > n; i--)
-			header[0x34 + i] = '\0';
+		strncpy((char *)header + 0x34, title, 16);
 	}
 
 	if (setid) {