*/
void CL_NextDemo (void)
{
- char str[1024];
+ char str[MAX_INPUTLINE];
if (cls.demonum == -1)
return; // don't play demos
*/
void CL_PlayDemo_f (void)
{
- char name[256];
+ char name[MAX_QPATH];
int c;
qboolean neg = false;
r_refdef.maxentities = MAX_EDICTS + 256 + 512;
r_refdef.entities = (entity_render_t **)Mem_Alloc(cl_mempool, sizeof(entity_render_t *) * r_refdef.maxentities);
// 256k drawqueue buffer
+ // TODO: make dynamic
r_refdef.maxdrawqueuesize = 256 * 1024;
r_refdef.drawqueue = (unsigned char *)Mem_Alloc(cl_mempool, r_refdef.maxdrawqueuesize);
void CL_ParseEntityLump(char *entdata)
{
const char *data;
- char key[128], value[4096];
+ char key[128], value[MAX_INPUTLINE];
FOG_clear(); // LordHavoc: no fog until set
// LordHavoc: default to the map's sky (q3 shader parsing sets this)
R_SetSkyBox(cl.worldmodel->brush.skybox);
===============================================================================
*/
-char scr_centerstring[1024];
+char scr_centerstring[MAX_INPUTLINE];
float scr_centertime_start; // for slow victory printing
float scr_centertime_off;
int scr_center_lines;
static void R_Envmap_f (void)
{
int j, size;
- char filename[256], basename[256];
+ char filename[MAX_QPATH], basename[MAX_QPATH];
unsigned char *buffer1;
unsigned char *buffer2;
unsigned char *buffer3;
static void CL_PlayVideo_f(void)
{
- char name[1024];
+ char name[MAX_QPATH];
Host_StartVideo();
#include "quakedef.h"
#define MAX_ALIAS_NAME 32
+// this is the largest script file that can be executed in one step
+// LordHavoc: inreased this from 8192 to 32768
+#define CMDBUFSIZE 32768
+// maximum number of parameters to a command
+#define MAX_ARGS 80
+// maximum tokenizable commandline length (counting NUL terminations)
+#define CMD_TOKENIZELENGTH (MAX_INPUTLINE + 80)
typedef struct cmdalias_s
{
static mempool_t *cmd_mempool;
-#define CMD_TOKENIZELENGTH 4096
static char cmd_tokenizebuffer[CMD_TOKENIZELENGTH];
static int cmd_tokenizebufferpos = 0;
=============================================================================
*/
- // LordHavoc: inreased this from 8192 to 32768
static sizebuf_t cmd_text;
-static unsigned char cmd_text_buf[32768];
+static unsigned char cmd_text_buf[CMDBUFSIZE];
/*
============
static void Cmd_PreprocessString( const char *intext, char *outtext, unsigned maxoutlen, cmdalias_t *alias );
void Cbuf_Execute (void)
{
-#define EXECUTESTRING_BUFFER 2048
int i;
char *text;
- char line[1024];
- char preprocessed[EXECUTESTRING_BUFFER];
+ char line[MAX_INPUTLINE];
+ char preprocessed[MAX_INPUTLINE];
int quotes;
// LordHavoc: making sure the tokenizebuffer doesn't get filled up by repeated crashes
}
// execute the command line
- Cmd_PreprocessString( line, preprocessed, EXECUTESTRING_BUFFER, NULL );
+ Cmd_PreprocessString( line, preprocessed, sizeof(preprocessed), NULL );
Cmd_ExecuteString (preprocessed, src_command);
if (cmd_wait)
{
int i, j, l;
// this is per command, and bounds checked (no buffer overflows)
- char build[2048];
+ char build[MAX_INPUTLINE];
if (Cmd_Argc () != 1)
{
static void Cmd_Alias_f (void)
{
cmdalias_t *a;
- char cmd[1024];
+ char cmd[MAX_INPUTLINE];
int i, c;
const char *s;
xcommand_t function;
} cmd_function_t;
-
-#define MAX_ARGS 80
-
static int cmd_argc;
static const char *cmd_argv[MAX_ARGS];
static const char *cmd_null_string = "";
*/
static void Cmd_ExecuteAlias (cmdalias_t *alias)
{
-#define ALIAS_BUFFER 1024
- static char buffer[ ALIAS_BUFFER + 2 ];
- Cmd_PreprocessString( alias->value, buffer, ALIAS_BUFFER, alias );
+ static char buffer[ MAX_INPUTLINE + 2 ];
+ Cmd_PreprocessString( alias->value, buffer, sizeof(buffer) - 2, alias );
Cbuf_AddText( buffer );
}
extern qboolean fs_modified; // set true if using non-id files
-char com_token[1024];
+char com_token[MAX_INPUTLINE];
int com_argc;
const char **com_argv;
-// LordHavoc: made commandline 1024 characters instead of 256
-#define CMDLINE_LENGTH 1024
-char com_cmdline[CMDLINE_LENGTH];
+char com_cmdline[MAX_INPUTLINE];
gamemode_t gamemode;
const char *gamename;
char *MSG_ReadString (void)
{
- static char string[2048];
+ static char string[MAX_INPUTLINE];
int l,c;
for (l = 0;l < (int) sizeof(string) - 1 && (c = MSG_ReadChar()) != -1 && c != 0;l++)
string[l] = c;
{
// arg contains whitespace, store quotes around it
com_cmdline[n++] = '\"';
- while ((n < (CMDLINE_LENGTH - 1)) && com_argv[j][i])
+ while ((n < ((int)sizeof(com_cmdline) - 1)) && com_argv[j][i])
com_cmdline[n++] = com_argv[j][i++];
com_cmdline[n++] = '\"';
}
else
{
- while ((n < (CMDLINE_LENGTH - 1)) && com_argv[j][i])
+ while ((n < ((int)sizeof(com_cmdline) - 1)) && com_argv[j][i])
com_cmdline[n++] = com_argv[j][i++];
}
- if (n < (CMDLINE_LENGTH - 1))
+ if (n < ((int)sizeof(com_cmdline) - 1))
com_cmdline[n++] = ' ';
else
break;
// written by Elric, thanks Elric!
char *SearchInfostring(const char *infostring, const char *key)
{
- static char value [256];
- char crt_key [256];
+ static char value [MAX_INPUTLINE];
+ char crt_key [MAX_INPUTLINE];
size_t value_ind, key_ind;
char c;
#ifndef COMMON_H
#define COMMON_H
+// many buffers use this size
+#define MAX_INPUTLINE 16384
+
// MSVC has a different name for several standard functions
#ifdef WIN32
//============================================================================
-extern char com_token[1024];
+extern char com_token[MAX_INPUTLINE];
int COM_ParseToken(const char **datapointer, int returnnewline);
int COM_ParseTokenConsole(const char **datapointer);
con_totallines = CON_TEXTSIZE / con_linewidth;
// Allocate a log queue
- logq_size = 512;
+ logq_size = MAX_INPUTLINE;
logqueue = (unsigned char *)Mem_Alloc (tempmempool, logq_size);
logq_ind = 0;
{
int mask = 0;
static int index = 0;
- static char line[16384];
+ static char line[MAX_INPUTLINE];
for (;*msg;msg++)
{
// append the character
line[index++] = *msg;
// if this is a newline character, we have a complete line to print
- if (*msg == '\n' || index >= 16000)
+ if (*msg == '\n' || index >= (int)sizeof(line) / 2)
{
// terminate the line
line[index] = 0;
}
-// LordHavoc: increased from 4096 to 16384
-#define MAXPRINTMSG 16384
-
/*
================
Con_Printf
void Con_Printf(const char *fmt, ...)
{
va_list argptr;
- char msg[MAXPRINTMSG];
+ char msg[MAX_INPUTLINE];
va_start(argptr,fmt);
dpvsnprintf(msg,sizeof(msg),fmt,argptr);
void Con_DPrintf(const char *fmt, ...)
{
va_list argptr;
- char msg[MAXPRINTMSG];
+ char msg[MAX_INPUTLINE];
if (!developer.integer)
return; // don't confuse non-developers with techie stuff...
{
int y;
int i;
- char editlinecopy[257], *text;
+ char editlinecopy[MAX_INPUTLINE+1], *text;
if (!key_consoleactive)
return; // don't draw anything
y = (int)strlen(text);
// fill out remainder with spaces
- for (i = y; i < 256; i++)
+ for (i = y; i < (int)sizeof(editlinecopy)-1; i++)
text[i] = ' ';
// add the cursor frame
char *text;
int i;
float time;
- extern char chat_buffer[256];
- char temptext[256];
+ char temptext[MAX_INPUTLINE];
int colorindex = -1; //-1 for default
if (con_notify.integer < 0)
*/
void Cvar_SetValueQuick(cvar_t *var, float value)
{
- char val[256];
+ char val[MAX_INPUTLINE];
if ((float)((int)value) == value)
sprintf(val, "%i", (int)value);
void Cvar_SetValue(const char *var_name, float value)
{
- char val[256];
+ char val[MAX_INPUTLINE];
if ((float)((int)value) == value)
sprintf(val, "%i", (int)value);
int FS_VPrintf (qfile_t* file, const char* format, va_list ap)
{
int len;
- fs_offset_t buff_size;
- char *tempbuff = NULL;
+ fs_offset_t buff_size = MAX_INPUTLINE;
+ char *tempbuff;
- buff_size = 1024;
- tempbuff = (char *)Mem_Alloc (tempmempool, buff_size);
- len = dpvsnprintf (tempbuff, buff_size, format, ap);
- while (len < 0)
+ for (;;)
{
- Mem_Free (tempbuff);
- buff_size *= 2;
tempbuff = (char *)Mem_Alloc (tempmempool, buff_size);
len = dpvsnprintf (tempbuff, buff_size, format, ap);
+ if (len >= 0 && len < buff_size)
+ break;
+ Mem_Free (tempbuff);
+ buff_size *= 2;
}
len = write (file->handle, tempbuff, len);
int linebufpos;
int i, j, k, l;
const char *name;
- char linebuf[4096];
+ char linebuf[MAX_INPUTLINE];
fssearch_t *search;
search = FS_Search(pattern, true, true);
if (!search)
{
GLint vertexshadercompiled, fragmentshadercompiled, programlinked;
GLuint vertexshaderobject, fragmentshaderobject, programobject = 0;
- char compilelog[4096];
+ char compilelog[MAX_INPUTLINE];
CHECKGLERROR
programobject = qglCreateProgramObjectARB();
*/
void Host_Error (const char *error, ...)
{
- static char hosterrorstring1[4096];
- static char hosterrorstring2[4096];
+ static char hosterrorstring1[MAX_INPUTLINE];
+ static char hosterrorstring2[MAX_INPUTLINE];
static qboolean hosterror = false;
va_list argptr;
void SV_ClientPrintf(const char *fmt, ...)
{
va_list argptr;
- char msg[4096];
+ char msg[MAX_INPUTLINE];
va_start(argptr,fmt);
dpvsnprintf(msg,sizeof(msg),fmt,argptr);
void SV_BroadcastPrintf(const char *fmt, ...)
{
va_list argptr;
- char msg[4096];
+ char msg[MAX_INPUTLINE];
va_start(argptr,fmt);
dpvsnprintf(msg,sizeof(msg),fmt,argptr);
void Host_ClientCommands(const char *fmt, ...)
{
va_list argptr;
- char string[1024];
+ char string[MAX_INPUTLINE];
va_start(argptr,fmt);
dpvsnprintf(string, sizeof(string), fmt, argptr);
*/
void Host_Savegame_f (void)
{
- char name[256];
+ char name[MAX_QPATH];
qfile_t *f;
int i;
char comment[SAVEGAME_COMMENT_LENGTH+1];
int j, quoted;
const char *p1;
char *p2;
- // LordHavoc: 256 char say messages
- char text[256];
+ // LordHavoc: long say messages
+ char text[1024];
qboolean fromServer = false;
if (cmd_source == src_command)
client_t *save;
int j;
const char *p1, *p2;
- char text[1024]; // LordHavoc: FIXME: temporary buffer overflow fix (was 64)
+ char text[MAX_INPUTLINE]; // LordHavoc: FIXME: temporary buffer overflow fix (was 64)
qboolean fromServer = false;
if (cmd_source == src_command)
Key_In_Bind_f (void)
{
int i, c, b, m;
- char cmd[1024];
+ char cmd[MAX_INPUTLINE];
c = Cmd_Argc ();
Key_Bind_f (void)
{
int i, c, b;
- char cmd[1024];
+ char cmd[MAX_INPUTLINE];
c = Cmd_Argc ();
typedef enum keydest_e { key_game, key_message, key_menu } keydest_t;
#define MAX_INPUTLINES 32
-#define MAX_INPUTLINE 256
#define MAX_BINDMAPS 8
#define MAX_KEYS 1024
extern int edit_line;
extern void Key_ClearEditLine(int edit_line);
extern qboolean chat_team;
-extern char chat_buffer[256];
+extern char chat_buffer[MAX_INPUTLINE];
extern unsigned int chat_bufferlen;
void Key_WriteBindings(qfile_t *f);
int keys[NUMKEYS];
int y;
cachepic_t *p;
- char keystring[1024];
+ char keystring[MAX_INPUTLINE];
M_Background(320, 48 + 8 * numcommands);
void MP_Error(const char *format, ...)
{
static qboolean processingError = false;
- char errorstring[4096];
+ char errorstring[MAX_INPUTLINE];
va_list argptr;
va_start (argptr, format);
texture_t *tx, *tx2, *anims[10], *altanims[10];
dmiptexlump_t *m;
unsigned char *data, *mtdata;
- char name[256];
+ char name[MAX_QPATH];
loadmodel->data_textures = NULL;
key[strlen(key)-1] = 0;
if (!COM_ParseToken(&data, false))
return; // error
- strcpy(value, com_token);
+ dpsnprintf(value, sizeof(value), "%s", com_token);
if (!strcmp("wad", key)) // for HalfLife maps
{
if (loadmodel->brush.ishlbsp)
{
j = 0;
- for (i = 0;i < 4096;i++)
+ for (i = 0;i < (int)sizeof(value);i++)
if (value[i] != ';' && value[i] != '\\' && value[i] != '/' && value[i] != ':')
break;
if (value[i])
{
- for (;i < 4096;i++)
+ for (;i < (int)sizeof(value);i++)
{
// ignore path - the \\ check is for HalfLife... stupid windoze 'programmers'...
if (value[i] == '\\' || value[i] == '/' || value[i] == ':')
static void Mod_Q3BSP_LoadEntities(lump_t *l)
{
const char *data;
- char key[128], value[4096];
+ char key[128], value[MAX_INPUTLINE];
float v[3];
loadmodel->brushq3.num_lightgrid_cellsize[0] = 64;
loadmodel->brushq3.num_lightgrid_cellsize[1] = 64;
// LordHavoc: added this to semi-fix the problem of using many ftos calls in a print
#define STRINGTEMP_BUFFERS 16
-#define STRINGTEMP_LENGTH 4096
+#define STRINGTEMP_LENGTH MAX_INPUTLINE
static char pr_string_temp[STRINGTEMP_BUFFERS][STRINGTEMP_LENGTH];
static int pr_string_tempindex = 0;
//this function originally written by KrimZon, made shorter by LordHavoc
//20040203: rewritten by LordHavoc (no longer uses allocations)
int num_tokens = 0;
-char *tokens[256], tokenbuf[4096];
+char *tokens[256], tokenbuf[MAX_INPUTLINE];
void PF_tokenize (void)
{
int pos;
//int NoCrash_NUM_FOR_EDICT(prvm_edict_t *e);
char *PR_ValueString (etype_t type, prvm_eval_t *val)
{
- static char line[1024]; // LordHavoc: enlarged a bit (was 256)
+ static char line[MAX_INPUTLINE];
ddef_t *def;
mfunction_t *f;
int n;
*/
char *PR_UglyValueString (etype_t type, prvm_eval_t *val)
{
- static char line[4096];
+ static char line[MAX_INPUTLINE];
int i;
const char *s;
ddef_t *def;
int i, j;
const char *name;
int type;
- char tempstring[8192], tempstring2[260]; // temporary string buffers
+ char tempstring[MAX_INPUTLINE], tempstring2[260]; // temporary string buffers
if (ed->priv.server->free)
{
if (j == type_size[type])
continue;
- if (strlen(name) > 256)
+ if (strlen(name) > sizeof(tempstring2)-4)
{
- memcpy (tempstring2, name, 256);
- tempstring2[256] = tempstring2[257] = tempstring2[258] = '.';
- tempstring2[259] = 0;
+ memcpy (tempstring2, name, sizeof(tempstring2)-4);
+ tempstring2[sizeof(tempstring2)-4] = tempstring2[sizeof(tempstring2)-3] = tempstring2[sizeof(tempstring2)-2] = '.';
+ tempstring2[sizeof(tempstring2)-1] = 0;
name = tempstring2;
}
strlcat (tempstring, name, sizeof (tempstring));
strcat(tempstring, " ");
name = PR_ValueString(d->type, (prvm_eval_t *)v);
- if (strlen(name) > 256)
+ if (strlen(name) > sizeof(tempstring2)-4)
{
- memcpy(tempstring2, name, 256);
- tempstring2[256] = tempstring2[257] = tempstring2[258] = '.';
- tempstring2[259] = 0;
+ memcpy (tempstring2, name, sizeof(tempstring2)-4);
+ tempstring2[sizeof(tempstring2)-4] = tempstring2[sizeof(tempstring2)-3] = tempstring2[sizeof(tempstring2)-2] = '.';
+ tempstring2[sizeof(tempstring2)-1] = 0;
name = tempstring2;
}
strlcat (tempstring, name, sizeof (tempstring));
strlcat (tempstring, "\n", sizeof (tempstring));
- if (strlen(tempstring) >= 4096)
+ if (strlen(tempstring) >= sizeof(tempstring)/2)
{
Con_Print(tempstring);
tempstring[0] = 0;
*/
void ED_ParseGlobals (const char *data)
{
- char keyname[1024]; // LordHavoc: good idea? bad idea? was 64
+ char keyname[MAX_INPUTLINE];
ddef_t *key;
while (1)
int i, j, ednum, used, usedamount;
int *counts;
const char *name;
- char tempstring[5000], tempstring2[260];
+ char tempstring[MAX_INPUTLINE], tempstring2[260];
prvm_edict_t *ed;
ddef_t *d;
int *v;
strlcat (tempstring, tempstring2, sizeof (tempstring));
break;
}
- if (strlen(name) > 256)
+ if (strlen(name) > sizeof(tempstring2)-4)
{
- memcpy(tempstring2, name, 256);
- tempstring2[256] = tempstring2[257] = tempstring2[258] = '.';
- tempstring2[259] = 0;
+ memcpy (tempstring2, name, sizeof(tempstring2)-4);
+ tempstring2[sizeof(tempstring2)-4] = tempstring2[sizeof(tempstring2)-3] = tempstring2[sizeof(tempstring2)-2] = '.';
+ tempstring2[sizeof(tempstring2)-1] = 0;
name = tempstring2;
}
strcat (tempstring, name);
dpsnprintf (tempstring2, sizeof (tempstring2), "%5d", counts[i]);
strlcat (tempstring, tempstring2, sizeof (tempstring));
strlcat (tempstring, "\n", sizeof (tempstring));
- if (strlen(tempstring) >= 4096)
+ if (strlen(tempstring) >= sizeof(tempstring)/2)
{
Con_Print(tempstring);
tempstring[0] = 0;
//this function originally written by KrimZon, made shorter by LordHavoc
//20040203: rewritten by LordHavoc (no longer uses allocations)
int num_tokens = 0;
-char *tokens[256], tokenbuf[4096];
+char *tokens[256], tokenbuf[MAX_INPUTLINE];
void VM_tokenize (void)
{
size_t pos;
#define e1000 e100,e100,e100,e100,e100,e100,e100,e100,e100,e100
#define VM_STRINGTEMP_BUFFERS 16
-#define VM_STRINGTEMP_LENGTH 4096
+#define VM_STRINGTEMP_LENGTH MAX_INPUTLINE
// builtins and other general functions
*/
char *PRVM_ValueString (etype_t type, prvm_eval_t *val)
{
- static char line[1024]; // LordHavoc: enlarged a bit (was 256)
+ static char line[MAX_INPUTLINE];
ddef_t *def;
mfunction_t *f;
int n;
*/
char *PRVM_UglyValueString (etype_t type, prvm_eval_t *val)
{
- static char line[4096];
+ static char line[MAX_INPUTLINE];
int i;
const char *s;
ddef_t *def;
int i, j;
const char *name;
int type;
- char tempstring[8192], tempstring2[260]; // temporary string buffers
+ char tempstring[MAX_INPUTLINE], tempstring2[260]; // temporary string buffers
if (ed->priv.required->free)
{
if (j == prvm_type_size[type])
continue;
- if (strlen(name) > 256)
+ if (strlen(name) > sizeof(tempstring2)-4)
{
- memcpy (tempstring2, name, 256);
- tempstring2[256] = tempstring2[257] = tempstring2[258] = '.';
- tempstring2[259] = 0;
+ memcpy (tempstring2, name, sizeof(tempstring2)-4);
+ tempstring2[sizeof(tempstring2)-4] = tempstring2[sizeof(tempstring2)-3] = tempstring2[sizeof(tempstring2)-2] = '.';
+ tempstring2[sizeof(tempstring2)-1] = 0;
name = tempstring2;
}
strcat(tempstring, name);
strcat(tempstring, " ");
name = PRVM_ValueString((etype_t)d->type, (prvm_eval_t *)v);
- if (strlen(name) > 256)
+ if (strlen(name) > sizeof(tempstring2)-4)
{
- memcpy (tempstring2, name, 256);
- tempstring2[256] = tempstring2[257] = tempstring2[258] = '.';
- tempstring2[259] = 0;
+ memcpy (tempstring2, name, sizeof(tempstring2)-4);
+ tempstring2[sizeof(tempstring2)-4] = tempstring2[sizeof(tempstring2)-3] = tempstring2[sizeof(tempstring2)-2] = '.';
+ tempstring2[sizeof(tempstring2)-1] = 0;
name = tempstring2;
}
strcat(tempstring, name);
strcat(tempstring, "\n");
- if (strlen(tempstring) >= 4096)
+ if (strlen(tempstring) >= sizeof(tempstring)/2)
{
Con_Print(tempstring);
tempstring[0] = 0;
*/
void PRVM_ED_ParseGlobals (const char *data)
{
- char keyname[1024]; // LordHavoc: good idea? bad idea? was 64
+ char keyname[MAX_INPUTLINE];
ddef_t *key;
while (1)
{
int i, j, ednum, used, usedamount;
int *counts;
- char tempstring[5000], tempstring2[260];
+ char tempstring[MAX_INPUTLINE], tempstring2[260];
const char *name;
prvm_edict_t *ed;
ddef_t *d;
strcat(tempstring, tempstring2);
break;
}
- if (strlen(name) > 256)
+ if (strlen(name) > sizeof(tempstring2)-4)
{
- memcpy (tempstring2, name, 256);
- tempstring2[256] = tempstring2[257] = tempstring2[258] = '.';
- tempstring2[259] = 0;
+ memcpy (tempstring2, name, sizeof(tempstring2)-4);
+ tempstring2[sizeof(tempstring2)-4] = tempstring2[sizeof(tempstring2)-3] = tempstring2[sizeof(tempstring2)-2] = '.';
+ tempstring2[sizeof(tempstring2)-1] = 0;
name = tempstring2;
}
strcat(tempstring, name);
sprintf(tempstring2, "%5d", counts[i]);
strcat(tempstring, tempstring2);
strcat(tempstring, "\n");
- if (strlen(tempstring) >= 4096)
+ if (strlen(tempstring) >= sizeof(tempstring)/2)
{
Con_Print(tempstring);
tempstring[0] = 0;
size_t bufchars, bufmaxchars;
char *buf, *oldbuf;
char name[MAX_QPATH];
- char line[1024];
+ char line[MAX_INPUTLINE];
if (!r_shadow_worldlightchain)
return;
if (r_refdef.worldmodel == NULL)
char *entfiledata;
const char *data;
float origin[3], angles[3], radius, color[3], light[4], fadescale, lightscale, originhack[3], overridecolor[3], vec[4];
- char key[256], value[1024];
+ char key[256], value[MAX_INPUTLINE];
if (r_refdef.worldmodel == NULL)
{
vec3_t origin, angles, color;
vec_t radius, corona, coronasizescale, ambientscale, diffusescale, specularscale;
int style, shadows, flags, normalmode, realtimemode;
- char cubemapname[1024];
+ char cubemapname[MAX_INPUTLINE];
if (!r_editlights.integer)
{
Con_Print("Cannot spawn light when not in editing mode. Set r_editlights to 1.\n");
radius = r_shadow_selectedlight->radius;
style = r_shadow_selectedlight->style;
if (r_shadow_selectedlight->cubemapname)
- strcpy(cubemapname, r_shadow_selectedlight->cubemapname);
+ strlcpy(cubemapname, r_shadow_selectedlight->cubemapname, sizeof(cubemapname));
else
cubemapname[0] = 0;
shadows = r_shadow_selectedlight->shadow;
static int skyrendersphere;
static int skyrenderbox;
static rtexturepool_t *skytexturepool;
-static char skyname[256];
+static char skyname[MAX_QPATH];
typedef struct suffixinfo_s
{
{
int i, j, success;
int indices[4] = {0,1,2,3};
- char name[1024];
+ char name[MAX_INPUTLINE];
unsigned char *image_rgba;
unsigned char *temp;
void Sys_Error (const char *error, ...)
{
va_list argptr;
- char string[1024];
+ char string[MAX_INPUTLINE];
// change stdin to non blocking
#ifndef WIN32
{
if (cls.state == ca_dedicated)
{
- static char text[256];
+ static char text[MAX_INPUTLINE];
static unsigned int len = 0;
#ifdef WIN32
int c;
void Sys_Error (const char *error, ...)
{
va_list argptr;
- char string[1024];
+ char string[MAX_INPUTLINE];
// change stdin to non blocking
#ifndef WIN32
{
if (cls.state == ca_dedicated)
{
- static char text[256];
+ static char text[MAX_INPUTLINE];
int len = 0;
#ifdef WIN32
int c;
void Sys_Error (const char *error, ...)
{
va_list argptr;
- char text[1024];
+ char text[MAX_INPUTLINE];
static int in_sys_error0 = 0;
static int in_sys_error1 = 0;
static int in_sys_error2 = 0;
char *Sys_ConsoleInput (void)
{
- static char text[256];
+ static char text[MAX_INPUTLINE];
static int len;
INPUT_RECORD recs[1024];
int ch;