mirror of
https://github.com/freedoom/freedoom.git
synced 2025-09-01 04:25:45 -04:00
genmidi: Strip instrument name trailing whitespace.
Some of the DMXGUS instrument names seem to have long sections of whitespace like this, and we can clean it up while dumping.
This commit is contained in:
parent
276118107b
commit
ffb7348b8e
2 changed files with 2 additions and 2 deletions
|
@ -123,7 +123,7 @@ def decode_voice(data, name):
|
|||
|
||||
result["m_ksl_volume"] = result["m_ksl"] | result["m_volume"]
|
||||
result["c_ksl_volume"] = result["c_ksl"] | result["c_volume"]
|
||||
result["name"] = name.decode("ascii").rstrip("\0")
|
||||
result["name"] = name.decode("ascii").rstrip("\0").rstrip()
|
||||
|
||||
return result
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ def read(filename):
|
|||
raise Exception("Invalid header for SBI file!")
|
||||
|
||||
instr_data = data[36:]
|
||||
result = {"name": name.decode("ascii").rstrip("\0")}
|
||||
result = {"name": name.decode("ascii").rstrip("\0").rstrip()}
|
||||
|
||||
for i in range(len(FIELDS)):
|
||||
result[FIELDS[i]], = struct.unpack("B", instr_data[i : i + 1])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue