As noted here: #4 (comment)
There is a slight issue with the scoping logic for pointers using the same variable name for verses, stanzas, and poems. Here's an example script that shows the issue:
#include "stdio.h"
#include "stdlib.h"
int main(){
int n = 0;
int *c = calloc(1, sizeof(int));
c[0] = 5;
printf("C: %d\n", c[0]);
{
int *a = c;
a[0] = 100;
int n = 1;
printf("%d\n", n);
}
printf("C: %d\n", c[0]);
printf("%d\n", n);
return 0;
}
Essentially, we need to define a new variable for pointers (in this case c -> a for internal blocks. Because we use thismethod for creating prologues for verses and stanzas, there is a possibility that users will use the same variabe (c in this case), which will cause a segfault when using c[0] (instead of a[0]) in the inner block.
The quick fix for now is simply to make sure that the variable names in all stanza, verse, and poem arguments are unique.
As noted here: #4 (comment)
There is a slight issue with the scoping logic for pointers using the same variable name for verses, stanzas, and poems. Here's an example script that shows the issue:
Essentially, we need to define a new variable for pointers (in this case
c->afor internal blocks. Because we use thismethod for creating prologues for verses and stanzas, there is a possibility that users will use the same variabe (cin this case), which will cause a segfault when usingc[0](instead ofa[0]) in the inner block.The quick fix for now is simply to make sure that the variable names in all stanza, verse, and poem arguments are unique.