%lex-param {Lily_parser *parser}
/* We use SCMs to do strings, because it saves us the trouble of
-deleting them. Let's hope that a stack overflow doesnt trigger a move
+deleting them. Let's hope that a stack overflow doesn't trigger a move
of the parse stack onto the heap. */
%left PREC_BOT
{
Music *m = unsmob_music ($1);
- while (m && m->is_mus_type ("music-wrapper-music"))
- m = unsmob_music (m->get_property ("element"));
+ while (m && m->is_mus_type ("music-wrapper-music")) {
+ $$ = m->get_property ("element");
+ m = unsmob_music ($$);
+ }
if (!(m && m->is_mus_type ("rhythmic-event"))) {
parser->parser_error (@$, _ ("not a rhythmic event"));