In select_file_handler properly initialize newpath preventing memory errors and crashes
This commit is contained in:
parent
887e8ed22c
commit
067d54f8e3
|
@ -4,6 +4,7 @@ D1X-Rebirth Changelog
|
|||
--------
|
||||
arch/include/jukebox.h, arch/sdl/jukebox.c, include/u_mem.h, main/menu.c: Add path browsing feature to make song file/directory selection easier
|
||||
include/u_mem.h, main/menu.c: Moving upwards definition of MEM_K so it's not restricted to !NDEBUG; Initialized **i in list_dir_el properly to silence gcc when compiling
|
||||
main/menu.c: In select_file_handler properly initialize newpath preventing memory errors and crashes
|
||||
|
||||
20100825
|
||||
--------
|
||||
|
|
|
@ -1262,6 +1262,7 @@ int select_file_handler(listbox *menu, d_event *event, browser *b)
|
|||
int citem = listbox_get_citem(menu);
|
||||
const char *sep = PHYSFS_getDirSeparator();
|
||||
|
||||
memset(newpath, 0, sizeof(char)*PATH_MAX);
|
||||
switch (event->type)
|
||||
{
|
||||
case EVENT_NEWMENU_SELECTED:
|
||||
|
|
Loading…
Reference in a new issue