--- parser3/src/classes/op.C 2002/04/18 10:51:00 1.91 +++ parser3/src/classes/op.C 2002/04/19 08:54:35 1.93 @@ -4,7 +4,7 @@ Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - $Id: op.C,v 1.91 2002/04/18 10:51:00 paf Exp $ + $Id: op.C,v 1.93 2002/04/19 08:54:35 paf Exp $ */ #include "classes.h" @@ -196,9 +196,9 @@ static void _for(Request& r, const Strin bool need_delim=false; VInt *vint=new(pool) VInt(pool, 0); + r.root->put_element(var_name, vint); for(int i=from; i<=to; i++) { vint->set_int(i); - r.root->put_element(var_name, vint); StringOrValue processed_body=r.process(body_code); if(delim_maybe_code) { // delimiter set? @@ -628,7 +628,7 @@ static void _throw_operator(Request& r, } else { const char *type=params->as_string(0, "type must be string").cstr(); const String& source=params->as_string(1, "source must be string"); - const char *comment=params->as_string(2, "comment must be string").cstr(); + const char *comment=params->size()>2?params->as_string(2, "comment must be string").cstr():0; throw Exception(type, &source, comment); } }