diff options
author | Pixel <pixel@nobis-crew.org> | 2011-11-25 07:38:36 -0800 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-11-25 07:38:36 -0800 |
commit | 5ed7471257348063b156ef1f0c0a5f2898112636 (patch) | |
tree | 20453ec62653d2e29917670416b7573d4fc3ad47 /src | |
parent | 9fbc552b4496234a4023dbd18165d9ad8305587d (diff) |
Making values other than bool always true.
Diffstat (limited to 'src')
-rw-r--r-- | src/SimpleMustache.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/SimpleMustache.cc b/src/SimpleMustache.cc index 8dffc74..f14d460 100644 --- a/src/SimpleMustache.cc +++ b/src/SimpleMustache.cc @@ -340,13 +340,12 @@ Balau::SimpleMustache::Fragments::iterator Balau::SimpleMustache::render_r(IO<Ha f = sCtx->find(fr->str); if (f != sCtx->end()) { Context * var = f->second; - Assert((var->m_type == Context::BOOLSEC) || (var->m_type == Context::CONTEXTLIST)); - if ((var->m_type == Context::BOOLSEC) && (var->m_bool)) { - cur = render_r(h, ctx, fr->str, ++cur, false, idx); - break; - } else if (var->m_type == Context::CONTEXTLIST) { + if (var->m_type == Context::CONTEXTLIST) { cur = render_r(h, var, fr->str, ++cur, false, -1); break; + } else if (((var->m_type == Context::BOOLSEC) && (var->m_bool)) || (var->m_type != Context::BOOLSEC)) { + cur = render_r(h, ctx, fr->str, ++cur, false, idx); + break; } } cur = render_r(h, NULL, fr->str, ++cur, true, -1); |