Generally use PATH_MAX for filename arrays in titles code
This commit is contained in:
parent
ee3a1b6189
commit
8c5f76a2aa
|
@ -4,6 +4,7 @@ D1X-Rebirth Changelog
|
|||
--------
|
||||
2d/bitblt.c, arch/ogl/gr.c, arch/ogl/ogl.c, include/ogl_init.h, main/menu.c: Added feature to enable Anisotropic filtering is supported by hardware or driver; Reworked way of handling texture filtering information so ingame switching is possible again; Little fix for ogl_get_verinfo which was taken out for ordinary OGL code but should for OGLES
|
||||
main/menu.c: When changing resolutions and Game_wind is present, send EVENT_WINDOW_ACTIVATE shortly so it's canvase will align to the new resolution seamlessly
|
||||
main/titles.c: Generally use PATH_MAX for filename arrays in titles code
|
||||
|
||||
20110115
|
||||
--------
|
||||
|
|
|
@ -137,7 +137,7 @@ int show_title_screen( char * filename, int allow_keys, int from_hog_only )
|
|||
title_screen *ts;
|
||||
window *wind;
|
||||
int pcx_error;
|
||||
char new_filename[FILENAME_LEN+1] = "";
|
||||
char new_filename[PATH_MAX] = "";
|
||||
|
||||
MALLOC(ts, title_screen, 1);
|
||||
if (!ts)
|
||||
|
@ -179,7 +179,7 @@ int show_title_screen( char * filename, int allow_keys, int from_hog_only )
|
|||
|
||||
void show_titles(void)
|
||||
{
|
||||
char publisher[16];
|
||||
char publisher[PATH_MAX];
|
||||
|
||||
songs_play_song( SONG_TITLE, 1 );
|
||||
|
||||
|
@ -199,7 +199,7 @@ void show_titles(void)
|
|||
|
||||
void show_order_form()
|
||||
{
|
||||
char exit_screen[16];
|
||||
char exit_screen[PATH_MAX];
|
||||
|
||||
strcpy(exit_screen, "warning.pcx"); // D1 Registered
|
||||
if (! cfexist(exit_screen))
|
||||
|
@ -212,7 +212,7 @@ void show_order_form()
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
typedef struct {
|
||||
char bs_name[16]; // filename, eg merc01. Assumes .lbm suffix.
|
||||
char bs_name[PATH_MAX]; // filename, eg merc01. Assumes .lbm suffix.
|
||||
sbyte level_num;
|
||||
sbyte message_num;
|
||||
short text_ulx, text_uly; // upper left x,y of text window
|
||||
|
@ -300,7 +300,7 @@ typedef struct briefing
|
|||
short cur_screen;
|
||||
briefing_screen *screen;
|
||||
grs_bitmap background;
|
||||
char background_name[16];
|
||||
char background_name[PATH_MAX];
|
||||
char *text;
|
||||
char *message;
|
||||
int text_x, text_y;
|
||||
|
@ -904,9 +904,9 @@ int load_briefing_screen(briefing *br, char *fname)
|
|||
char *ptr;
|
||||
if ((ptr = strrchr(fname2,'.')))
|
||||
*ptr = '\0';
|
||||
strncat(fname2, "h.pcx", sizeof(char)*FILENAME_LEN);
|
||||
strncat(fname2, "h.pcx", sizeof(char)*PATH_MAX);
|
||||
if (!cfexist(fname2))
|
||||
snprintf(fname2, sizeof(char)*FILENAME_LEN, "%s", fname);
|
||||
snprintf(fname2, sizeof(char)*PATH_MAX, "%s", fname);
|
||||
}
|
||||
d_free(forigin);
|
||||
|
||||
|
|
Loading…
Reference in a new issue