From b6c74c1c2077ce0c4dcd525890ea739a807f1508 Mon Sep 17 00:00:00 2001 From: truelight Date: Tue, 14 Dec 2004 20:27:00 +0000 Subject: (svn r1090) -Fix: Made the _openttd_revision variable global, and with that hopefully killed the windows-revision problem. If WITH_REV is defined, for both Windows as *nix system _openttd_revision is filled with normal info, else _openttd_revision is set to 'norev000' -Fix: Small possible server-crash --- console.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'console.c') diff --git a/console.c b/console.c index 211fb27b9..57f7c25bc 100644 --- a/console.c +++ b/console.c @@ -232,14 +232,6 @@ static void IConsoleWndProc(Window* w, WindowEvent* e) void IConsoleInit(void) { uint i; -#ifdef WITH_REV_HACK - #define WITH_REV - const char _openttd_revision[] = WITH_REV_HACK; -#else - #if defined(WITH_REV) - extern char _openttd_revision[]; - #endif -#endif _iconsole_output_file = NULL; _iconsole_color_default = 1; _iconsole_color_error = 3; @@ -604,7 +596,7 @@ void IConsoleAliasExec(const char* cmdline, char* tokens[20], byte tokentypes[20 if (cmdline[i] == '+') { // all params seperated: "[param 1]" "[param 2]" t=1; - while ((tokens[t]!=NULL) && (t<20) && + while ((tokens[t]!=NULL) && (t<20) && ((tokentypes[t] == ICONSOLE_VAR_STRING) || (tokentypes[t] == ICONSOLE_VAR_UNKNOWN))) { int l2 = strlen(tokens[t]); *linestream = '"'; @@ -623,7 +615,7 @@ void IConsoleAliasExec(const char* cmdline, char* tokens[20], byte tokentypes[20 t=1; *linestream = '"'; linestream++; - while ((tokens[t]!=NULL) && (t<20) && + while ((tokens[t]!=NULL) && (t<20) && ((tokentypes[t] == ICONSOLE_VAR_STRING) || (tokentypes[t] == ICONSOLE_VAR_UNKNOWN))) { int l2 = strlen(tokens[t]); memcpy(linestream,tokens[t],l2); @@ -640,7 +632,7 @@ void IConsoleAliasExec(const char* cmdline, char* tokens[20], byte tokentypes[20 // one specific parameter: %A = [param 1] %B = [param 2] ... int l2; t = ((byte)cmdline[i]) - 64; - if ((t<20) && (tokens[t]!=NULL) && + if ((t<20) && (tokens[t]!=NULL) && ((tokentypes[t] == ICONSOLE_VAR_STRING) || (tokentypes[t] == ICONSOLE_VAR_UNKNOWN))) { l2 = strlen(tokens[t]); *linestream = '"'; -- cgit v1.2.3-54-g00ecf