forked from hkc/cc-stuff
1
0
Fork 0

Don't add empty songs into ToC

This commit is contained in:
Casey 2023-10-17 16:20:16 +03:00
parent 42063e0271
commit adcae533d0
Signed by: hkc
GPG Key ID: F0F6CFE11CDB0960
1 changed files with 9 additions and 7 deletions

View File

@ -56,9 +56,10 @@ function()
for i = 1, 48 do for i = 1, 48 do
local offset = read32() local offset = read32()
local length = read32() local length = read32()
local title = drive.read(117) local title = drive.read(117):gsub("\x00", "")
if length > 0 then
table.insert(table_of_contents, { table.insert(table_of_contents, {
title = length > 0 and title or nil, title = title,
offset = offset, offset = offset,
length = length, length = length,
ending = offset + length ending = offset + length
@ -67,6 +68,7 @@ function()
end end
end end
end end
end
end, end,
function() function()
local tape_was_present = nil local tape_was_present = nil