lorid

convert chordpro to pdf
git clone git://git.relim.de/lorid.git
Log | Files | Refs | README | LICENSE

commit f628721585120e10549e36dc84ca68b042e08158
parent 839d04eea6d10aa8b8396fde89bd48215a0898a4
Author: nibo <nibo@relim.de>
Date:   Thu, 20 Feb 2025 12:05:05 +0100

Reset transposition in case of {new_song} directive

Diffstat:
Msrc/chordpro.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/chordpro.c b/src/chordpro.c @@ -4419,6 +4419,12 @@ cho_songs_parse(FILE *fp, const char *chordpro_filepath, struct Config *config) LOG_DEBUG("cho_song_new failed."); return NULL; } + free(ctx.transpose_history); + ctx.th = 0; + ctx.transpose_history = emalloc((ctx.th+1) * sizeof(int *)); + ctx.transpose_history[ctx.th] = 0; + ctx.transpose = &ctx.transpose_history[ctx.th]; + ctx.th++; ctx.se = 0; ctx.li = 0; ctx.lii = 0;