Skip to content

Commit

Permalink
fix build with MSVC and GCC
Browse files Browse the repository at this point in the history
MSVC errors:
Quake\ls_main.c(321,11): error C2057: expected constant expression
Quake\ls_main.c(321,21): error C2466: cannot allocate an array of constant size 0

GCC error:
Quake/ls_main.c:321:9: error: variable-sized object may not be initialized
  • Loading branch information
alexey-lysiuk committed Aug 9, 2023
1 parent 83cd627 commit aceabc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Quake/ls_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static void LS_InitStandardLibraries(lua_State* state)

static int LS_Print(lua_State* state)
{
static const int MAX_LENGTH = 4096; // MAXPRINTMSG
enum PrintDummyEnum { MAX_LENGTH = 4096 }; // See MAXPRINTMSG
char buf[MAX_LENGTH] = { '\0' };

char* bufptr = buf;
Expand Down

0 comments on commit aceabc7

Please sign in to comment.