Skip to content

Commit

Permalink
Fix data text expressions initialized with an empty string not being …
Browse files Browse the repository at this point in the history
…evaluated correctly, see #213.
  • Loading branch information
mikke89 committed Jul 21, 2021
1 parent 9d767bc commit 85582af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Core/DataViewDefault.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,12 @@ bool DataViewText::Initialize(DataModel& model, Element* element, const String&
DataEntry entry;
entry.index = text.size();
entry.data_expression = MakeUnique<DataExpression>(String(in_text.begin() + begin_brackets + 1, in_text.begin() + cur - 1));
entry.value = "#rmlui#"; // A random value that the user string will not be initialized with.

if (entry.data_expression->Parse(expression_interface, false))
data_entries.push_back(std::move(entry));

// Reset char so that it won't appended to the output
// Reset char so that it won't be appended to the output
c = 0;
}
else if (!in_brackets && previous)
Expand Down

0 comments on commit 85582af

Please sign in to comment.