From e660884e499ff16bb564772255e5ddd564d48e99 Mon Sep 17 00:00:00 2001 From: FelixBrendel Date: Mon, 6 Apr 2020 10:23:01 +0200 Subject: [PATCH] using standard compliant swprintf --- src/built_ins.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/built_ins.cpp b/src/built_ins.cpp index 498c1d3..670a426 100644 --- a/src/built_ins.cpp +++ b/src/built_ins.cpp @@ -74,7 +74,7 @@ namespace Slime { path_char fullpath[MAX_PATH]; #ifdef UNICODE 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); free(temp); #else @@ -89,7 +89,7 @@ namespace Slime { #ifdef UNICODE fullpath[0] = L'\0'; 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); #else fullpath[0] = '\0';