Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Commit

Permalink
fix: crash when wrong duration in 2 voice overlays and bad ties
Browse files Browse the repository at this point in the history
Issue #87.
  • Loading branch information
moinejf committed Apr 30, 2021
1 parent 3169ace commit a8b5def
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions parse.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This file is part of abcm2ps.
*
* Copyright (C) 1998-2020 Jean-François Moine (http://moinejf.free.fr)
* Copyright (C) 1998-2021 Jean-François Moine (http://moinejf.free.fr)
* Adapted from abc2ps, Copyright (C) 1996-1998 Michael Methfessel
*
* This program is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -2016,8 +2016,6 @@ static char txt_no_note[] = "No note in voice overlay";
error(1, s, tx_wrong_dur);
if (p_voice->time > over_mxtime)
curvoice->time = p_voice->time;
else
p_voice->time = curvoice->time;
}
over_mxtime = 0;
over_voice = -1;
Expand Down Expand Up @@ -2120,8 +2118,12 @@ static char txt_no_note[] = "No note in voice overlay";
} else {
if (over_mxtime == 0)
over_mxtime = p_voice->time;
else if (p_voice->time != over_mxtime)
else if (p_voice->time != over_mxtime) {
error(1, s, tx_wrong_dur);
if (p_voice->time > over_mxtime)
voice_tb[over_voice].time =
over_mxtime = p_voice->time;
}
}
p_voice2->time = over_time;
curvoice = p_voice2;
Expand Down

1 comment on commit a8b5def

@Microsvuln
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please confirm Issue#92

Please sign in to comment.