Commit ebdb87b

Nick committed on
Fix crash when importing malformed mod fileS
commit ebdb87b774ffc4ed26a068e42830997d928f6e73 parent fdc5dcc
1 changed files +2−2
Modifiedmodimport.pas +2−2
@@ -95,8 +95,8 @@ function ConvertNote(Note: Integer): Integer;
95 begin 95 begin
96 if Note = 0 then 96 if Note = 0 then
97 Result := NO_NOTE 97 Result := NO_NOTE
98 else 98 else if not PeriodToCodeMap.TryGetData(Note, Result) then
99 Result := PeriodToCodeMap.KeyData[Note]; 99 Result := LOWEST_NOTE;
100 end; 100 end;
101 101
102 function ConvertInstrument(Instr: Integer): Integer; 102 function ConvertInstrument(Instr: Integer): Integer;