GUI: fix wave edit randomize

This commit is contained in:
tildearrow 2022-10-19 13:14:52 -05:00
parent 47fb434d5b
commit 7486bb17f4

View file

@ -819,7 +819,7 @@ void FurnaceGUI::drawWaveEdit() {
if (ImGui::Button("Randomize",buttonSize)) { if (ImGui::Button("Randomize",buttonSize)) {
if (wave->max>0) e->lockEngine([this,wave]() { if (wave->max>0) e->lockEngine([this,wave]() {
for (int i=0; i<wave->len; i++) { for (int i=0; i<wave->len; i++) {
wave->data[i]=rand()%wave->max; wave->data[i]=rand()%(wave->max+1);
} }
MARK_MODIFIED; MARK_MODIFIED;
}); });