Skip to content

Commit

Permalink
fixing store patch bug found in #191
Browse files Browse the repository at this point in the history
  • Loading branch information
bwhitman committed Sep 12, 2024
1 parent 78ae7c8 commit 9d3ee22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/patches.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ void patches_reset() {
}
}


void patches_store_patch(char * message) {
// patch#,amy patch string
// put it in ram
Expand All @@ -79,8 +80,8 @@ void patches_store_patch(char * message) {
char sub_message[255];
uint16_t start = 0;
for(uint16_t i=0;i<strlen(patch);i++) {
if(message[i] == 'Z') {
strncpy(sub_message, message + start, i - start + 1);
if(patch[i] == 'Z') {
strncpy(sub_message, patch + start, i - start + 1);
sub_message[i-start+1]= 0;
struct event patch_event = amy_parse_message(sub_message);
if(patch_event.osc > max_osc) max_osc = patch_event.osc;
Expand Down

0 comments on commit 9d3ee22

Please sign in to comment.