From 7db60fe7da370c0d37182a27ec8af928cd066b40 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sat, 19 Mar 2022 22:07:52 -0700 Subject: hle: nvflinger: parcel: Reserve token size. --- src/core/hle/service/nvflinger/parcel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/core/hle/service/nvflinger/parcel.h b/src/core/hle/service/nvflinger/parcel.h index b41c1732e..aa36e6479 100644 --- a/src/core/hle/service/nvflinger/parcel.h +++ b/src/core/hle/service/nvflinger/parcel.h @@ -89,7 +89,8 @@ public: [[maybe_unused]] const u32 unknown = Read(); const u32 length = Read(); - std::u16string token{}; + std::u16string token; + token.reserve(length + 1); for (u32 ch = 0; ch < length + 1; ++ch) { token.push_back(ReadUnaligned()); -- cgit v1.2.3