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
This commit is contained in:
cutealien 2022-04-25 09:48:26 +00:00
parent 92564435f4
commit 532675ffa4

@ -1217,7 +1217,7 @@ void CGUITable::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWri
Column column; Column column;
label = "Column"; label += i; label += "name"; 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"; label = "Column"; label += i; label += "width";
column.Width = in->getAttributeAsInt(label.c_str()); column.Width = in->getAttributeAsInt(label.c_str());
label = "Column"; label += i; label += "OrderingMode"; label = "Column"; label += i; label += "OrderingMode";
@ -1252,7 +1252,7 @@ void CGUITable::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWri
Cell cell; Cell cell;
label = "Row"; label += i; label += "cell"; label += c; label += "text"; 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 ); breakText( cell.Text, cell.BrokenText, Columns[c].Width );
label = "Row"; label += i; label += "cell"; label += c; label += "color"; label = "Row"; label += i; label += "cell"; label += c; label += "color";
cell.Color = in->getAttributeAsColor(label.c_str()); cell.Color = in->getAttributeAsColor(label.c_str());