8000 terminate called after throwing an instance of 'std::length_error' · Issue #21 · no1msd/mstch · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

8779 terminate called after throwing an instance of 'std::length_error' #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
byt3f1ire opened this issue May 19, 2017 · 0 comments
Open

Comments

@byt3f1ire
Copy link

Hello,

My program crashes when it renders the following view:

//crash1.cpp
#include

#define MY_HEADER "/root/mstch/include/mstch/mstch.hpp"
#include MY_HEADER

int main() {
//original
//std::string view{"{{#names}}Hi {{name}}!\n{{/names}}"};

//crash1
std::string view {"{{#names}}<b>{{count}}</b>: {{=}}\n{{/names}}"};

mstch::map context{
{"names", mstch::array{
mstch::map{{"name", std::string{"Chris"}}},
}}
};

std::cout << mstch::render(view, context) << std::endl;

return 0;
}

clang++ -g -std=c++11 -Wall -Wextra -O3 crash1.cpp -rdynamic /root/mstch/src/libmstch.a
./a.out
terminate called after throwing an instance of 'std::length_error'
what(): basic_string::_S_create
zsh: abort ./a.out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0