Skip to content

Commit

Permalink
off-by-one fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hukkax committed Nov 23, 2020
1 parent 0e99a9b commit f70e197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protracker/protracker.sample.pas
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ procedure TSample.Clear;
procedure TSample.StoreBackup;
begin
BackupLength := (Length * 2) and $FFFF;
SetLength(Backup, BackupLength);
SetLength(Backup, BackupLength + 1);
Move(Data[0], Backup[0], BackupLength);
end;

Expand Down

0 comments on commit f70e197

Please sign in to comment.