summaryrefslogtreecommitdiff
path: root/console.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-14 20:27:00 +0000
committertruelight <truelight@openttd.org>2004-12-14 20:27:00 +0000
commitb6c74c1c2077ce0c4dcd525890ea739a807f1508 (patch)
tree414a017a79ae9c8b05c4483bd6e6130f2b814562 /console.c
parent52aeaebde0f813375a5b08425fe522ffe1cc55c0 (diff)
downloadopenttd-b6c74c1c2077ce0c4dcd525890ea739a807f1508.tar.xz
(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
Diffstat (limited to 'console.c')
-rw-r--r--console.c14
1 files changed, 3 insertions, 11 deletions
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 = '"';