| @@ -74,7 +74,7 @@ namespace Slime { | |||||
| path_char fullpath[MAX_PATH]; | path_char fullpath[MAX_PATH]; | ||||
| #ifdef UNICODE | #ifdef UNICODE | ||||
| path_char* temp = char_to_path_char(Memory::get_c_str(file_name)); | path_char* temp = char_to_path_char(Memory::get_c_str(file_name)); | ||||
| swprintf(fullpath, L"%s", temp); | |||||
| swprintf(fullpath, MAX_PATH,L"%s", temp); | |||||
| file_content = read_entire_file(temp); | file_content = read_entire_file(temp); | ||||
| free(temp); | free(temp); | ||||
| #else | #else | ||||
| @@ -89,7 +89,7 @@ namespace Slime { | |||||
| #ifdef UNICODE | #ifdef UNICODE | ||||
| fullpath[0] = L'\0'; | fullpath[0] = L'\0'; | ||||
| path_char* temp = char_to_path_char(Memory::get_c_str(file_name)); | path_char* temp = char_to_path_char(Memory::get_c_str(file_name)); | ||||
| swprintf(fullpath, L"%s%s", it, temp); | |||||
| swprintf(fullpath, MAX_PATH, L"%s%s", it, temp); | |||||
| free(temp); | free(temp); | ||||
| #else | #else | ||||
| fullpath[0] = '\0'; | fullpath[0] = '\0'; | ||||