From 5ed7471257348063b156ef1f0c0a5f2898112636 Mon Sep 17 00:00:00 2001 From: Pixel Date: Fri, 25 Nov 2011 07:38:36 -0800 Subject: Making values other than bool always true. --- src/SimpleMustache.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') 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(IOfind(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); -- cgit v1.2.3