From 822a99034bc49ff5008d848a4cdaa1c12e9c8f08 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Sat, 1 Feb 2025 21:47:19 +0100 Subject: [PATCH] core: TupleValue deserialization from string supports elements with white spaces --- src/core/model/tuple.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/model/tuple.h b/src/core/model/tuple.h index 068cfeef2..78abd6da3 100644 --- a/src/core/model/tuple.h +++ b/src/core/model/tuple.h @@ -281,14 +281,17 @@ TupleValue::DeserializeFromString(std::string value, Ptr> values; std::size_t i = 0; - while (iss >> value) + for (std::string elem; std::getline(iss, elem, ',');) { + // remove leading whitespaces + std::istringstream tmp{elem}; + std::getline(tmp >> std::ws, value); + if (i >= count) { return false;