瀏覽代碼

- fixed crash with necromancy dialog #1009 (russian-only)
- Client::run will catch only asio exceptions
- (linux) fixed typo that disabled debug mode

Ivan Savenko 13 年之前
父節點
當前提交
1b50082e43
共有 5 個文件被更改,包括 9 次插入8 次删除
  1. 2 1
      client/Client.cpp
  2. 1 1
      client/GUIClasses.cpp
  3. 1 1
      configure
  4. 1 1
      configure.ac
  5. 4 4
      lib/CGameState.cpp

+ 2 - 1
client/Client.cpp

@@ -152,7 +152,8 @@ void CClient::run()
 			pack = NULL;
 		}
 	} 
-	catch (const std::exception& e)
+	//catch only asio exceptions
+	catch (const boost::system::system_error& e)
 	{	
 		tlog3 << "Lost connection to server, ending listening thread!\n";
 		tlog1 << e.what() << std::endl;

+ 1 - 1
client/GUIClasses.cpp

@@ -961,7 +961,7 @@ void CSelectableComponent::show(SDL_Surface * to)
 		CSDL_Ext::drawBorder(to, Rect::around(Rect(pos.x, pos.y, image->pos.w, image->pos.h)), int3(239,215,123));
 	}
 
-	printAtMiddleWB(subtitle,pos.x+pos.w/2,pos.y+pos.h+25,FONT_SMALL,12,Colors::Cornsilk,to);
+	printAtMiddleWB(subtitle,pos.x+pos.w/2,pos.y+pos.h+25,FONT_SMALL,14,Colors::Cornsilk,to);
 }
 
 void CSelWindow::selectionChange(unsigned to)

+ 1 - 1
configure

@@ -15221,7 +15221,7 @@ fi
 # For gcc and compatible compilers, enable compilation warnings, but
 # selectively disable some because too many are generated.
 if test "x$GXX" = "xyes" ; then
-   CXXFLAGS="$CXXFLAGSc -std=c++0x -Wall -Wextra -Wcast-align -Wpointer-arith -Wno-switch -Wno-sign-compare -Wno-unused-parameter"
+   CXXFLAGS="$CXXFLAGS -std=c++0x -Wall -Wextra -Wcast-align -Wpointer-arith -Wno-switch -Wno-sign-compare -Wno-unused-parameter"
 fi
 
 # extra clang parameters

+ 1 - 1
configure.ac

@@ -33,7 +33,7 @@ fi
 # For gcc and compatible compilers, enable compilation warnings, but
 # selectively disable some because too many are generated.
 if test "x$GXX" = "xyes" ; then
-   CXXFLAGS="$CXXFLAGSc -std=c++0x -Wall -Wextra -Wcast-align -Wpointer-arith -Wno-switch -Wno-sign-compare -Wno-unused-parameter"
+   CXXFLAGS="$CXXFLAGS -std=c++0x -Wall -Wextra -Wcast-align -Wpointer-arith -Wno-switch -Wno-sign-compare -Wno-unused-parameter"
 fi
 
 # extra clang parameters

+ 4 - 4
lib/CGameState.cpp

@@ -245,20 +245,20 @@ DLL_LINKAGE void MetaString::toString(std::string &dst) const
 			dst += boost::lexical_cast<std::string>(numbers[nums++]);
 			break;
 		case TREPLACE_ESTRING:
-			dst.replace (dst.find("%s"), 2, exactStrings[exSt++]);
+			boost::replace_first(dst, "%s", exactStrings[exSt++]);
 			break;
 		case TREPLACE_LSTRING:
 			{
 				std::string hlp;
 				getLocalString(localStrings[loSt++], hlp);
-				dst.replace (dst.find("%s"), 2, hlp);
+				boost::replace_first(dst, "%s", hlp);
 			}
 			break;
 		case TREPLACE_NUMBER:
-			dst.replace (dst.find("%d"), 2, boost::lexical_cast<std::string>(numbers[nums++]));
+			boost::replace_first(dst, "%d", boost::lexical_cast<std::string>(numbers[nums++]));
 			break;
 		case TREPLACE_PLUSNUMBER:
-			dst.replace (dst.find("%+d"), 3, '+' + boost::lexical_cast<std::string>(numbers[nums++]));
+			boost::replace_first(dst, "%+d", '+' + boost::lexical_cast<std::string>(numbers[nums++]));
 			break;
 		default:
 			tlog1 << "MetaString processing error!\n";