Skip to content

Critical bug causing complete crash #18

@ludekvodicka

Description

@ludekvodicka

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions