Fix compiler warnings

This commit is contained in:
James R 2020-02-20 17:18:26 -08:00
parent 3502278f8a
commit cce5308108
3 changed files with 4 additions and 4 deletions

View file

@ -34,7 +34,6 @@
#define FMT_FILECALLBACKID "file_callback_%d"
static const char *const fnames[] = {"input", "output"};
static const char *whitelist[] = { // Allow scripters to write files of these types to SRB2's folder
".bmp",
".cfg",
@ -230,6 +229,7 @@ static int io_openlocal (lua_State *L) {
FILE **pf;
const char *filename = luaL_checkstring(L, 1);
const char *mode = luaL_optstring(L, 2, "r");
char *realfilename;
luafiletransfer_t *filetransfer;
int checkresult;
@ -237,7 +237,7 @@ static int io_openlocal (lua_State *L) {
if (checkresult)
return checkresult;
char *realfilename = va("%s" PATHSEP "%s", luafiledir, filename);
realfilename = va("%s" PATHSEP "%s", luafiledir, filename);
if (client && strnicmp(filename, "client/", strlen("client/")))
I_Error("Access denied to %s\n"

View file

@ -98,7 +98,7 @@ INT32 lastfilenum = -1;
#ifdef HAVE_BLUA
luafiletransfer_t *luafiletransfers = NULL;
boolean waitingforluafiletransfer = false;
char luafiledir[256] = "luafiles";
char luafiledir[MAX_WADPATH] = "luafiles";
#endif

View file

@ -93,7 +93,7 @@ typedef struct luafiletransfer_s
extern luafiletransfer_t *luafiletransfers;
extern boolean waitingforluafiletransfer;
extern char luafiledir[256];
extern char luafiledir[MAX_WADPATH];
void AddLuaFileTransfer(const char *filename, const char *mode);
void SV_PrepareSendLuaFileToNextNode(void);