URL:
<http://gna.org/patch/?849>
Summary: iterator for labels_ should be initialized to
something
Project: Battle for Wesnoth
Submitted by: microe
Submitted on: Tuesday 11/13/2007 at 22:15
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
In the member function map_labels::get_label() in the file src/map_label.cpp,
the iterator itor is initialized if there is a valid team name in the list
labels_. But if there isn't, then the iterator has no connection to the list.
This means that when the code gets down to line 110 and itor is not
initialized, the test to see if it is the end iterator will possibly fail
incorrectly.
This patch just sets itor to end if no team name is found.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tuesday 11/13/2007 at 22:15 Name: initialize-label_map-iterator.patch
Size: 415B By: microe
<http://gna.org/patch/download.php?file_id=3201>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?849>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs