Skip to content

Commit

Permalink
Fix an off-by-one error introduced in #190 breaking the databinding s…
Browse files Browse the repository at this point in the history
…ample
  • Loading branch information
mikke89 committed May 26, 2021
1 parent f0b1a74 commit a33b379
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/DataViewDefault.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ 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 - 2));
entry.data_expression = MakeUnique<DataExpression>(String(in_text.begin() + begin_brackets + 1, in_text.begin() + cur - 1));

if (entry.data_expression->Parse(expression_interface, false))
data_entries.push_back(std::move(entry));
Expand Down
1 change: 1 addition & 0 deletions Tests/Source/UnitTests/DataBinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ static const String inside_string_rml = R"(
<p>{{ 'i{}23' }}</p>
<p>before {{ 'i{{test}}23' }} test</p>
<p>a {{ 'i' }} b {{ 'j' }} c</p>
<p>{{i0}}</p>
</div>
</body>
Expand Down

0 comments on commit a33b379

Please sign in to comment.