mail[Wesnoth-commits] r52640 - /trunk/src/map.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by strgaltent on January 17, 2012 - 23:28:
Author: anonymissimus
Date: Tue Jan 17 23:28:08 2012
New Revision: 52640

URL: http://svn.gna.org/viewcvs/wesnoth?rev=52640&view=rev
Log:
Require loaded maps to have at least 1 (non-border) hex (bug #19018)

(This new translatable string is only visible/useful for wml authors,
and we have lots on untranslated wml error messages anyway; also
they really don't need to be translatable)

Modified:
    trunk/src/map.cpp

Modified: trunk/src/map.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/map.cpp?rev=52640&r1=52639&r2=52640&view=diff
==============================================================================
--- trunk/src/map.cpp (original)
+++ trunk/src/map.cpp Tue Jan 17 23:28:08 2012
@@ -261,7 +261,7 @@
        total_height_ = total_width_ > 0 ? tiles_[0].size() : 0;
        w_ = total_width_ - 2 * border_size_;
        h_ = total_height_ - 2 * border_size_;
-
+       VALIDATE((w_ >= 1 && h_ >= 1), _("A map needs at least 1 tile, the 
map cannot be loaded."));
 
        for(int x = 0; x < total_width_; ++x) {
                for(int y = 0; y < total_height_; ++y) {




Related Messages


Powered by MHonArc, Updated Tue Jan 17 23:40:08 2012