summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
Diffstat (limited to 'core/io')
-rw-r--r--core/io/logger.cpp5
-rw-r--r--core/io/resource_loader.cpp2
2 files changed, 5 insertions, 2 deletions
diff --git a/core/io/logger.cpp b/core/io/logger.cpp
index 7ea5f06d7e..b94007d316 100644
--- a/core/io/logger.cpp
+++ b/core/io/logger.cpp
@@ -177,11 +177,14 @@ void RotatedFileLogger::logv(const char *p_format, va_list p_list, bool p_err) {
const int static_buf_size = 512;
char static_buf[static_buf_size];
char *buf = static_buf;
+ va_list list_copy;
+ va_copy(list_copy, p_list);
int len = vsnprintf(buf, static_buf_size, p_format, p_list);
if (len >= static_buf_size) {
buf = (char *)Memory::alloc_static(len + 1);
- vsnprintf(buf, len + 1, p_format, p_list);
+ vsnprintf(buf, len + 1, p_format, list_copy);
}
+ va_end(list_copy);
file->store_buffer((uint8_t *)buf, len);
if (len >= static_buf_size) {
Memory::free_static(buf);
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp
index 89cb4a22c2..ed0d491679 100644
--- a/core/io/resource_loader.cpp
+++ b/core/io/resource_loader.cpp
@@ -492,7 +492,7 @@ void ResourceLoader::reload_translation_remaps() {
void ResourceLoader::load_translation_remaps() {
- if (!ProjectSettings::get_singleton()->has("locale/translation_remaps"))
+ if (!ProjectSettings::get_singleton()->has_setting("locale/translation_remaps"))
return;
Dictionary remaps = ProjectSettings::get_singleton()->get("locale/translation_remaps");