From a65c4bc1e3417f464f79890491aaf0952c6a9157 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 23 Jan 2020 01:34:55 +0000 Subject: [PATCH 1/2] Added bugfix to Organya --- src/Organya.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Organya.cpp b/src/Organya.cpp index bef4ab9b..2ca7c080 100644 --- a/src/Organya.cpp +++ b/src/Organya.cpp @@ -514,7 +514,11 @@ BOOL OrgData::SetMusicInfo(MUSICINFO *mi, unsigned long flag) for (i = 0; i < MAXMELODY; i++) { info.tdata[i].freq = mi->tdata[i].freq; - info.tdata[i].pipi = info.tdata[i].pipi; // info.tdata[i].pipi is assigned to itself. Thanks, Pixel. (Most likely, the original code wasn't written the exact same way) + #ifdef FIX_BUGS + info.tdata[i].pipi = mi->tdata[i].pipi; + #else + info.tdata[i].pipi = info.tdata[i].pipi; // Just sets info.tdata[i].pipi to itself + #endif } } From 4091d152eea6738610306f19e8b389cb83ecf470 Mon Sep 17 00:00:00 2001 From: Clownacy Date: Thu, 23 Jan 2020 01:36:19 +0000 Subject: [PATCH 2/2] Minor style tweak --- src/Organya.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Organya.cpp b/src/Organya.cpp index 2ca7c080..5c6ec673 100644 --- a/src/Organya.cpp +++ b/src/Organya.cpp @@ -551,11 +551,11 @@ BOOL OrgData::NoteAlloc(unsigned short alloc) if (info.tdata[i].note_p != NULL) { free(info.tdata[i].note_p); -#ifdef FIX_BUGS + #ifdef FIX_BUGS info.tdata[i].note_p = NULL; -#else + #else info.tdata[j].note_p = NULL; // Uses j instead of i -#endif + #endif } }