chore: special case saving for ROMS without titles

This commit is contained in:
2022-04-27 18:08:44 -05:00
parent 417810581b
commit a87b46898b
3 changed files with 22 additions and 12 deletions

View File

@@ -60,7 +60,7 @@ pub fn intToBytes(comptime T: type, value: anytype) [@sizeOf(T)]u8 {
///
/// This function returns a slice of everything just before the first
/// `\0`
pub fn correctTitle(title: [12]u8) []const u8 {
pub fn asString(title: [12]u8) []const u8 {
var len = title.len;
for (title) |char, i| {
if (char == 0) {
@@ -76,7 +76,7 @@ pub fn correctTitle(title: [12]u8) []const u8 {
/// array consisting of ASCII that won't make any file system angry
///
/// e.g. POKEPIN R/S to POKEPIN R_S
pub fn safeTitle(title: [12]u8) [12]u8 {
pub fn escape(title: [12]u8) [12]u8 {
var result: [12]u8 = title;
for (result) |*char| {