Author: anonymissimus
Date: Tue Mar 15 01:08:43 2011
New Revision: 48914
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48914&view=rev
Log:
Fixed map_location::matches_range treating minus signs as separating dashes of
coordinate ranges (fix for bug #17854).
Modified:
trunk/src/map_location.cpp
Modified: trunk/src/map_location.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/map_location.cpp?rev=48914&r1=48913&r2=48914&view=diff
==============================================================================
--- trunk/src/map_location.cpp (original)
+++ trunk/src/map_location.cpp Tue Mar 15 01:08:43 2011
@@ -265,7 +265,7 @@
if(!xloc.empty()) {
const std::string::const_iterator dash =
std::find(xloc.begin(),xloc.end(),'-');
- if(dash != xloc.end()) {
+ if(dash != xloc.begin() && dash != xloc.end()) {
const std::string beg(xloc.begin(),dash);
const std::string end(dash+1,xloc.end());
@@ -284,7 +284,7 @@
const std::string::const_iterator dash =
std::find(yloc.begin(),yloc.end(),'-');
- if(dash != yloc.end()) {
+ if(dash != yloc.begin() && dash != yloc.end()) {
const std::string beg(yloc.begin(),dash);
const std::string end(dash+1,yloc.end());
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits