Project

General

Profile

Revision 619a1b8d

ID619a1b8dd3d26b6c7c6f6efc0105e70735002a2b
Parent b3a1dae4
Child a224a762

Added by Yuyang Guo about 10 years ago

fix emitter in range check crashing bug

View differences:

scout/scoutsim/src/sim_frame.cpp
214 214
            ROS_WARN("An emitter named [%s] already exists", req.name.c_str());
215 215
            return false;
216 216
        }
217

  
218 217
        res.name = name;
219 218
        return true;
220 219
    }
......
786 785
                }
787 786

  
788 787
                if(is_inrange(emitter_pos, bom_pos, bom_aperture, bom_distance)) {
789
                    string em_id_str = it->first.substr(it->first.find("_"));
788
                    string em_id_str = m_it->first.substr(m_it->first.find("_"));
790 789
                    int emitter_id = atoi(em_id_str.c_str());
791 790
                    it->second->update_BOM(i, 1, emitter_id);
792 791
                }

Also available in: Unified diff