This problem seems to occur, when you have to read one character in the first and a string in the second line. With the generated stub, you read the two lines in two variables, but the second variable is always empty. This problems disappears if you read three values and only use the first and the third.
Is this a problem with my code for the generation of the stub or with the stub itself?
read c:string(1) gets translated to char c; fgets(c, 2, stdin);
But it should be char c; fgets(c, 3, stdin); as you read the actual text, the linebreak and the \0 to terminate the string.
You can verify it like this: for (int i = 0; i < 3; i++) printf("%d ", c[i]); // print 100 10 0 (with 100='d')
I remember @Niako reporting that about a year ago. It also caused some hiccups in the last contest, see stub.txt.
As mentioned, it’s a known problem with the stub generator that will hopefully eventually be fixed by CG.
I fixed it manually by increasing the size of the expected string (string(2) — which is actually 2+1 with the current generator for C — to parse 1 char + "\n\0" in C).
I did the same with the puzzle mentioned by @The_Auditor (and already answered here).