Branch: Tag:

2004-06-09

2004-06-09 08:47:17 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Added some paranoia to set_from_form().
Fixes [bug 3703 (#3703)].

Rev: server/etc/modules/Variable.pmod/module.pmod:1.85

1: - // $Id: module.pmod,v 1.84 2004/02/17 20:15:40 mast Exp $ + // $Id: module.pmod,v 1.85 2004/06/09 08:47:17 grubba Exp $      #include <module.h>   #include <roxen.h>
1343:    foreach( indices( vl ), string vv )    if( sscanf( vv, ".set.%d", rn ) && (vv == ".set."+rn) )    { +  if ((rn >= 0) && (rn < sizeof(l))) {    m_delete( id->variables, path()+vv );    l[rn] = transform_from_form( vl[vv], vl );    m_delete( vl, vv ); -  +  } else { +  report_debug("set_from_form(%O): vv:%O sizeof(l):%d\n", +  id, vv, sizeof(l));    } -  +  }    // then the move...    foreach( indices(vl), string vv )    if( sscanf( vv, ".up.%d.x%*s", rn ) == 2 )