-
Notifications
You must be signed in to change notification settings - Fork 227
Closed
Labels
Description
Hi,
I just found very strange bug which I'm not able to fix.
With this template application halted on invalid pointers and a lot of asserts.
{% if 1 >= 18 %}…{% endif %}
{% for v in vals %}
{% if v > 0%}+{%else%}-{%endif%}
{% endfor %}
Here is test snippet:
nlohmann::json data;
data["vals"] = { "1","2" };
InjaStringType res = inja::render("{% if 1 >= 18 %}…{% endif %}{% for v in vals %}{% if v > 0%}+{%else%}-{%endif%}{% endfor %}", data);
Error:
Debug Assertion Failed!
Program: C:\WINDOWS\SYSTEM32\MSVCP140D.dll
File: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xutility
Line: 1115
Expression: invalid null pointer
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.