From 532675ffa477ec8b82773b621b2a52bbcbef26d3 Mon Sep 17 00:00:00 2001 From: cutealien Date: Mon, 25 Apr 2022 09:48:26 +0000 Subject: [PATCH] Fix string deserialization in CGUITable. Use now getAttributeAsStringW instead of getAttributeAsString. Thanks @chronologicaldot for report and patch: https://irrlicht.sourceforge.io/forum/viewtopic.php?f=7&t=52821 git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6358 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/CGUITable.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/Irrlicht/CGUITable.cpp b/source/Irrlicht/CGUITable.cpp index 206f7ff..9c89cf1 100644 --- a/source/Irrlicht/CGUITable.cpp +++ b/source/Irrlicht/CGUITable.cpp @@ -1217,7 +1217,7 @@ void CGUITable::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWri Column column; label = "Column"; label += i; label += "name"; - column.Name = core::stringw(in->getAttributeAsString(label.c_str()).c_str()); + column.Name = in->getAttributeAsStringW(label.c_str()); label = "Column"; label += i; label += "width"; column.Width = in->getAttributeAsInt(label.c_str()); label = "Column"; label += i; label += "OrderingMode"; @@ -1252,7 +1252,7 @@ void CGUITable::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWri Cell cell; label = "Row"; label += i; label += "cell"; label += c; label += "text"; - cell.Text = core::stringw(in->getAttributeAsString(label.c_str()).c_str()); + cell.Text = in->getAttributeAsStringW(label.c_str()); breakText( cell.Text, cell.BrokenText, Columns[c].Width ); label = "Row"; label += i; label += "cell"; label += c; label += "color"; cell.Color = in->getAttributeAsColor(label.c_str());