From 47814ca4318bee12d8f8f64d5130a4f645f975bb Mon Sep 17 00:00:00 2001 From: jsd1982 Date: Tue, 27 Oct 2020 18:22:29 -0500 Subject: [PATCH] nall: fix bad memory access pattern in string.format --- nall/string/format.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nall/string/format.hpp b/nall/string/format.hpp index 9f8a6974..7af01ed0 100755 --- a/nall/string/format.hpp +++ b/nall/string/format.hpp @@ -41,7 +41,7 @@ auto string::format(const nall::string_format& params) -> type& { if(sourceSize > targetSize) { uint difference = sourceSize - targetSize; - memory::move(&data[x], &data[x + difference], remaining); + memory::move(&data[x], &data[x + difference], remaining - difference); size -= difference; } else if(targetSize > sourceSize) { uint difference = targetSize - sourceSize;