I've downloaded the new "alpha" version and I think there's a bug with how the Decompiler handles some arrays in .sco files.
You can consistently reproduce it in QFG1-EGA, as follows:
Start with a fresh copy of the game, and decompile as you normally would. (btw, I love the new changes to the decompile dialog; It think it really flows a lot more naturally than before... including the prompting to decompile all if none are selected, and the auto-re-decompiling if any global names change.)
Everything should be fine so far. The .sco file is as expected. (We're going to be interested in offset 0xB57).
Now Open up Main.sc and change:
global190 = 2
global191 = 2
global192 = 3
global193 = 3
global194 = 3
global195 = 4
global196 = 5
global197 = 5
to
[global190 8] = [2 2 3 3 3 4 5 5]
(fyi, global190 is spellCost). So now we've converted it to an array.
Compile Main.sc, and it compiles without error. The .sco file is still as expected. The first position of the array is recorded as [0a 00] [67 6c 6f 62 61 6c 31 39 30 00] (aka the name is 10 bytes in length including the null terminator, and is 'global190'). The subsequent positions are each recorded as [01 00] [00], seven times. i.e. the name is just 1 byte; the null terminator. I assume this should already be familiar to anybody familiar with the .sco file format.
At this point, everything is working correctly.
Now, to introduce the error, go back to the decompile window, and decompile just Main.sc. The new Main.sc will now show that array as
global190 = 2
= 2
_2 = 3
_3 = 3
_4 = 3
_5 = 4
_6 = 5
_7 = 5
and save that likewise into the .sco file.
I assume it is doing that in an effort to not allow duplicate filenames, by appending an '_x' to the end of the null variable. Looks like that's only a problem for global variables, too. I'm not seeing any problems in re-decompiling User.sc, for example.
Edited to say, I don't think this bug is a regression, either. I had the same problem on the current official release.