shithub: pt2-clone

Download patch

ref: 4779a03e2b2d864feb6afcabec8cf1e708d0d168
parent: ba9a38b8266fd42f2bc327b7e6e60866812cbb92
author: Olav Sørensen <olav.sorensen@live.no>
date: Thu Jun 8 11:30:30 EDT 2023

Sampler "volume normalize" single-selection fix

--- a/src/pt2_mouse.c
+++ b/src/pt2_mouse.c
@@ -1286,7 +1286,8 @@
 				}
 
 				int8_t *sampleData = &song->sampleData[s->offset];
-				if (editor.markStartOfs != -1)
+
+				if (editor.markStartOfs != -1 && editor.markEndOfs != editor.markStartOfs)
 				{
 					sampleData += editor.markStartOfs;
 					sampleLength = editor.markEndOfs - editor.markStartOfs;