src/town_gui.cpp
changeset 10484 e8beb2845f13
parent 10481 0c7aed4edabe
child 10569 1359ca399ddd
--- a/src/town_gui.cpp	Sat May 10 02:59:52 2008 +0000
+++ b/src/town_gui.cpp	Sat May 10 08:58:52 2008 +0000
@@ -23,6 +23,7 @@
 #include "core/alloc_func.hpp"
 #include "settings_type.h"
 #include "tilehighlight_func.h"
+#include "string_func.h"
 
 #include "table/sprites.h"
 #include "table/strings.h"
@@ -360,7 +361,7 @@
 			} break;
 
 		case WE_ON_EDIT_TEXT:
-			if (e->we.edittext.str[0] != '\0') {
+			if (!StrEmpty(e->we.edittext.str)) {
 				_cmd_text = e->we.edittext.str;
 				DoCommandP(0, w->window_number, 0, NULL,
 					CMD_RENAME_TOWN | CMD_MSG(STR_2008_CAN_T_RENAME_TOWN));