graphitemaster/gmqcc

internal error when a qc function is called with an empty parameter

Opened this issue · 2 comments

In this function call the last parameter is missing (it was a string):

    o = drawsprite_TextOrIcon(true, o, M_PI, (SPRITE_HEALTHBAR_WIDTH + 2 * SPRITE_HEALTHBAR_BORDER) * t, rgb, a, waypointsprite_fontsize * '1 1 0', txt,);
./common/turrets/cl_turrets.qc:183:148: error: internal error: parameter count mismatch: (zu+1+zu), zu
./common/turrets/cl_turrets.qc:183:148: error: there have been errors, bailing out

qc statement is wrong but gmqcc doesn't handle it properly

This just looks like the mingw builds are linking against a really old version of msvcrt so it's not printing the # of parameters correctly (%zu is a C99 thing (and also C++11), and vsnprintf in older versions didn't support this format specifier.)

In either case, I agree that this should not be classified as an ICE but rather a semantic failure.