nall: fix bad memory access pattern in string.format

This commit is contained in:
jsd1982 2020-10-27 18:22:29 -05:00 committed by Screwtapello
parent ac37afd153
commit 9d262ed113

View File

@ -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;