1
0
mirror of synced 2024-11-27 22:40:49 +01:00

writers.py: Fix bug with large score_diff values

This commit is contained in:
Viv 2024-02-10 18:08:10 -05:00
parent d4c3abb672
commit 3dbf82309e

View File

@ -41,7 +41,9 @@ def write_fumen(path_out: str, song: FumenCourse) -> None:
if note.hits:
extra_vals = [note.hits, note.hits_padding]
else:
extra_vals = [note.score_init, note.score_diff * 4]
# Max value for H -> 0xffff -> 65535
extra_vals = [min(65535, note.score_init),
min(65535, note.score_diff * 4)]
note_struct.extend(extra_vals)
note_struct.append(note.duration)
write_struct(file, song.header.order,