0
1
mirror of https://github.com/radio95-rnt/rds95.git synced 2026-02-26 20:33:53 +01:00

oh damn lua

This commit is contained in:
2025-12-29 00:10:32 +01:00
parent deb1bbe1f3
commit 33bd3a815a

View File

@@ -70,16 +70,16 @@ function load_station_logo(path, id, crc)
_Rft_crc_data = string.char(crc16(_Rft_file)) _Rft_crc_data = string.char(crc16(_Rft_file))
_Rft_crc_mode = 0 _Rft_crc_mode = 0
elseif crc and crc == 1 then elseif crc and crc == 1 then
for i = 1, #_Rft_file, 5*16 do _Rft_crc_data = _Rft_crc_data + string.char(string.byte(_Rft_file, i, 5*16)) end for i = 1, #_Rft_file, 5*16 do _Rft_crc_data = _Rft_crc_data .. string.char(string.byte(_Rft_file, i, 5*16)) end
_Rft_crc_mode = 1 _Rft_crc_mode = 1
elseif crc and crc == 2 then elseif crc and crc == 2 then
for i = 1, #_Rft_file, 5*32 do _Rft_crc_data = _Rft_crc_data + string.char(string.byte(_Rft_file, i, 5*32)) end for i = 1, #_Rft_file, 5*32 do _Rft_crc_data = _Rft_crc_data .. string.char(string.byte(_Rft_file, i, 5*32)) end
_Rft_crc_mode = 2 _Rft_crc_mode = 2
elseif crc and crc == 3 then elseif crc and crc == 3 then
for i = 1, #_Rft_file, 5*64 do _Rft_crc_data = _Rft_crc_data + string.char(string.byte(_Rft_file, i, 5*64)) end for i = 1, #_Rft_file, 5*64 do _Rft_crc_data = _Rft_crc_data .. string.char(string.byte(_Rft_file, i, 5*64)) end
_Rft_crc_mode = 3 _Rft_crc_mode = 3
elseif crc and crc == 4 then elseif crc and crc == 4 then
for i = 1, #_Rft_file, 5*128 do _Rft_crc_data = _Rft_crc_data + string.char(string.byte(_Rft_file, i, 5*128)) end for i = 1, #_Rft_file, 5*128 do _Rft_crc_data = _Rft_crc_data .. string.char(string.byte(_Rft_file, i, 5*128)) end
end end
if #_Rft_file > 262143 then error("The file is too large", 2) end if #_Rft_file > 262143 then error("The file is too large", 2) end