--- a/network_server.c Sat Oct 21 23:08:17 2006 +0000
+++ b/network_server.c Sat Oct 21 23:31:34 2006 +0000
@@ -3,6 +3,7 @@
#ifdef ENABLE_NETWORK
#include "stdafx.h"
+#include "openttd.h" // XXX StringID
#include "debug.h"
#include "string.h"
#include "strings.h"
@@ -144,7 +145,7 @@
NetworkSend_uint8(p, error);
NetworkSend_Packet(p, cs);
- GetNetworkErrorMsg(str, error);
+ GetNetworkErrorMsg(str, error, lastof(str));
// Only send when the current client was in game
if (cs->status > STATUS_AUTH) {
@@ -899,7 +900,7 @@
NetworkGetClientName(client_name, sizeof(client_name), cs);
- GetNetworkErrorMsg(str, errorno);
+ GetNetworkErrorMsg(str, errorno, lastof(str));
DEBUG(net, 2)("[NET] %s reported an error and is closing his connection (%s)", client_name, str);
@@ -1043,7 +1044,7 @@
if (ci != NULL && show_local) {
if (from_index == NETWORK_SERVER_INDEX) {
char name[NETWORK_NAME_LENGTH];
- GetString(name, GetPlayer(ci_to->client_playas)->name_1);
+ GetString(name, GetPlayer(ci_to->client_playas)->name_1, lastof(name));
NetworkTextMessage(action, GetDrawStringPlayerColor(ci_own->client_playas), true, name, "%s", msg);
} else {
FOR_ALL_CLIENTS(cs) {
@@ -1211,7 +1212,7 @@
// Grap the company name
SetDParam(0, p->name_1);
SetDParam(1, p->name_2);
- GetString(_network_player_info[p->index].company_name, STR_JUST_STRING);
+ GetString(_network_player_info[p->index].company_name, STR_JUST_STRING, lastof(_network_player_info[p->index].company_name));
// Check the income
if (_cur_year - 1 == p->inaugurated_year) {