[Csnd] Issue #1880

I cannot test on windows but on Linux this error is because there is no
newline at the end of prova.sco

Not tested prova.orc without a newline.

Also I have not looked at the code to see if I can magic up a newline.

Sorry to use this address but 2FA seems to stop me using Github as I
should. Would appreciate knowing how to use github again

==John ffitch

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        Issues · csound/csound · GitHub
Discussions of bugs and features can be posted here

I tested it with and without newline on either of the included files and
it segfaults. With newline it works.

Is there a way to prevent segaults? Always adding a newline?

the #include mechanis is used for include and macrs. Macro bodies can not hae a new-line in them. I did notice that there is a do_new_include and a do_ibclude function and I forget why ; how do they differ

I found a place to add a newline, after csound_prs.lex:787

    csound_prspush_buffer_state(YY_CURRENT_BUFFER, yyscanner);
    strcat(cf->body, "\n");
    csound_prs_scan_string(cf->body, yyscanner);

This seems to fix the crash. Does it look OK as a fix?