fix 'a-x open all code' crash in linux system_set_file
parent
3561eb7849
commit
df321f8d42
|
@ -319,9 +319,11 @@ Sys_Set_File_List_Sig(system_set_file_list){
|
||||||
File_Info *info_ptr;
|
File_Info *info_ptr;
|
||||||
i32 count, file_count, size, required_size;
|
i32 count, file_count, size, required_size;
|
||||||
|
|
||||||
terminate_with_null(&directory);
|
char* dir = (char*) alloca(directory.size + 1);
|
||||||
|
memcpy(dir, directory.str, directory.size);
|
||||||
|
dir[directory.size] = 0;
|
||||||
|
|
||||||
d = opendir(directory.str);
|
d = opendir(dir);
|
||||||
if (d){
|
if (d){
|
||||||
count = 0;
|
count = 0;
|
||||||
file_count = 0;
|
file_count = 0;
|
||||||
|
|
Loading…
Reference in New Issue