ref: ee2f1a650e94caef7c57e3484b0c10737f59b801
parent: 1c91e57185db253549444d70c1efda3f402ee38c
author: Olav Sørensen <olav.sorensen@live.no>
date: Mon Aug 2 07:39:30 EDT 2021
Bugfix for the volume ramper in the sample editor If you had clicked somewhere on the sample first (so that you get a one-pixel thick sample mark), the volume ramp routine wouldn't work on the whole sample, which it should.
--- a/src/pt2_mouse.c
+++ b/src/pt2_mouse.c
@@ -1473,7 +1473,7 @@
}
sampleData = &song->sampleData[s->offset];
- if (editor.markStartOfs != -1)
+ if (editor.markStartOfs != -1 && editor.markEndOfs-editor.markStartOfs >= 1)
{
sampleData += editor.markStartOfs;
sampleLength = editor.markEndOfs - editor.markStartOfs;