ubuntuusers.de

ftbfs.patch

Autor:
Quidoff
Datum:
16. Mai 2017 19:56
Code:
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# format is required
Index: warzone2100-3.2.3/lib/netplay/netplay.cpp
===================================================================
--- warzone2100-3.2.3.orig/lib/netplay/netplay.cpp	2017-05-16 19:05:40.376844613 +0200
+++ warzone2100-3.2.3/lib/netplay/netplay.cpp	2017-05-16 19:15:23.048284900 +0200
@@ -1016,7 +1016,7 @@
 		debug(LOG_NET, "%s", buf);
 		addConsoleMessage(buf, DEFAULT_JUSTIFY, NOTIFY_MESSAGE);
 		// beware of writing a line too long, it screws up console line count. \n is safe for line split
-		ssprintf(buf, _("You must manually configure your router & firewall to\n open port 2100 before you can host a game."));
+		ssprintf(buf, "%s", _("You must manually configure your router & firewall to\n open port 2100 before you can host a game."));
 		addConsoleMessage(buf, DEFAULT_JUSTIFY, NOTIFY_MESSAGE);
 		return false;
 	}
@@ -1024,7 +1024,7 @@
 	r = UPNP_GetExternalIPAddress(urls.controlURL, data.first.servicetype, externalIPAddress);
 	if (r != UPNPCOMMAND_SUCCESS)
 	{
-		ssprintf(externalIPAddress, "???");
+		ssprintf(externalIPAddress, "%s", "???");
 	}
 	ssprintf(buf, _("Game configured port (%s) correctly on (%s)\nYour external IP is %s"), port_str, lanaddr, externalIPAddress);
 	addConsoleMessage(buf, DEFAULT_JUSTIFY, NOTIFY_MESSAGE);
Index: warzone2100-3.2.3/src/multiint.cpp
===================================================================
--- warzone2100-3.2.3.orig/src/multiint.cpp	2017-04-23 15:12:16.000000000 +0200
+++ warzone2100-3.2.3/src/multiint.cpp	2017-05-16 19:27:10.065899566 +0200
@@ -3014,7 +3014,7 @@
 				else
 				{
 					NETresetGamePassword();
-					ssprintf(buf, _("*** password is NOT required! ***"));
+					ssprintf(buf, "%s", _("*** password is NOT required! ***"));
 					addConsoleMessage(buf, DEFAULT_JUSTIFY, NOTIFY_MESSAGE);
 				}
 				NETGameLocked(willSet);
@@ -3028,7 +3028,7 @@
 	{
 	case MULTIOP_MAP_MOD:
 		char buf[256];
-		ssprintf(buf, _("This is a map-mod, it can change your playing experience!"));
+		ssprintf(buf, "%s", _("This is a map-mod, it can change your playing experience!"));
 		addConsoleMessage(buf, DEFAULT_JUSTIFY, SYSTEM_MESSAGE);
 		break;
 
@@ -3862,34 +3862,34 @@
 				{
 					if (NetPlay.isUPNP_CONFIGURED)
 					{
-						ssprintf(buf, _("UPnP has been enabled."));
+						ssprintf(buf, "%s", _("UPnP has been enabled."));
 					}
 					else
 					{
 						if (NetPlay.isUPNP_ERROR)
 						{
-							ssprintf(buf, _("UPnP detection faled. You must manually configure router yourself."));
+							ssprintf(buf, "%s", _("UPnP detection faled. You must manually configure router yourself."));
 						}
 						else
 						{
-							ssprintf(buf, _("UPnP detection is in progress..."));
+							ssprintf(buf, "%s", _("UPnP detection is in progress..."));
 						}
 					}
 					addConsoleMessage(buf, DEFAULT_JUSTIFY, NOTIFY_MESSAGE);
 				}
 				else
 				{
-					ssprintf(buf, _("UPnP detection disabled by user. Autoconfig of port 2100 will not happen."));
+					ssprintf(buf, "%s", _("UPnP detection disabled by user. Autoconfig of port 2100 will not happen."));
 					addConsoleMessage(buf, DEFAULT_JUSTIFY, NOTIFY_MESSAGE);
 				}
 			}
 			if (challengeActive)
 			{
-				ssprintf(buf, _("Hit the ready box to begin your challenge!"));
+				ssprintf(buf, "%s", _("Hit the ready box to begin your challenge!"));
 			}
 			else if (!bHosted)
 			{
-				ssprintf(buf, _("Press the start hosting button to begin hosting a game."));
+				ssprintf(buf, "%s", _("Press the start hosting button to begin hosting a game."));
 			}
 			addConsoleMessage(buf, DEFAULT_JUSTIFY, NOTIFY_MESSAGE);
 		}
@@ -4234,7 +4234,7 @@
 			}
 			else
 			{
-				ssprintf(buf, "∞");  // Player has ping of somewhat questionable quality.
+				ssprintf(buf, "%s", "∞");  // Player has ping of somewhat questionable quality.
 			}
 			subText += buf;
 		}
Index: warzone2100-3.2.3/src/multijoin.cpp
===================================================================
--- warzone2100-3.2.3.orig/src/multijoin.cpp	2017-04-23 15:12:16.000000000 +0200
+++ warzone2100-3.2.3/src/multijoin.cpp	2017-05-16 19:28:12.028989405 +0200
@@ -484,7 +484,7 @@
 	if (NetPlay.HaveUpgrade)
 	{
 		audio_PlayTrack(ID_SOUND_BUILD_FAIL);
-		ssprintf(buf, _("There is an update to the game, please visit http://wz2100.net to download new version."));
+		ssprintf(buf, "%s", _("There is an update to the game, please visit http://wz2100.net to download new version."));
 		addConsoleMessage(buf, DEFAULT_JUSTIFY, NOTIFY_MESSAGE);
 	}
 	else
Index: warzone2100-3.2.3/src/multiplay.cpp
===================================================================
--- warzone2100-3.2.3.orig/src/multiplay.cpp	2016-12-03 22:52:09.000000000 +0100
+++ warzone2100-3.2.3/src/multiplay.cpp	2017-05-16 19:28:55.228354764 +0200
@@ -1703,11 +1703,11 @@
 			char buf[256];
 			if (game.isMapMod)
 			{
-				ssprintf(buf, _("Warning, this is a map-mod, it could alter normal gameplay."));
+				ssprintf(buf, "%s", _("Warning, this is a map-mod, it could alter normal gameplay."));
 			}
 			else
 			{
-				ssprintf(buf, _("Warning, HOST has altered the game code, and can't be trusted!"));
+				ssprintf(buf, "%s", _("Warning, HOST has altered the game code, and can't be trusted!"));
 			}
 			addConsoleMessage(buf,  DEFAULT_JUSTIFY, NOTIFY_MESSAGE);
 			game.isMapMod = true;