From 3cc1222de9bcc1671acafba4df904c48c8c3ee99 Mon Sep 17 00:00:00 2001 From: BodgeMaster <> Date: Thu, 6 Oct 2022 10:21:59 +0200 Subject: [PATCH] lib/nbt: Fix a bug in NBT::Helper::writeString() Writing a string to a byte vector would result in it being replaced with one holding only the string. --- src/lib/nbt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/nbt.cpp b/src/lib/nbt.cpp index a10b13a..d33e25c 100644 --- a/src/lib/nbt.cpp +++ b/src/lib/nbt.cpp @@ -364,7 +364,7 @@ namespace NBT { if(exportedString.isError){ return ErrorOrVoid(true, ErrorCodes::OVERRUN); } - *destination = exportedString.value; + destination->insert(destination->end(), exportedString.value.begin(), exportedString.value.end()); return ErrorOrVoid(); }