summaryrefslogtreecommitdiff
path: root/src/plugins/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/console.c')
-rw-r--r--src/plugins/console.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/console.c b/src/plugins/console.c
index 5056eafdc..7ea69c637 100644
--- a/src/plugins/console.c
+++ b/src/plugins/console.c
@@ -32,7 +32,8 @@
#define WORKER_FUNC_END(name) } ExitThread(0); return 0; }
#define WORKER_EXECUTE(name,errvar) \
do{ \
- buf.worker = CreateThread(NULL, 0, worker_ ## name, NULL, CREATE_SUSPENDED, NULL); \
+ DWORD dwThreadId; \
+ buf.worker = CreateThread(NULL, 0, worker_ ## name, NULL, CREATE_SUSPENDED, &dwThreadId); \
if( errvar ) \
*errvar = ( buf.worker == NULL ); \
}while(0)
@@ -135,7 +136,7 @@ unsigned int (*gettick)(void);
int (*parse_console)(char* buf);
// Locals
-int tid; // timer id
+int tid = -1; // timer id
BUFFER buf; // input buffer
WORKER_FUNC_DECLARE(getinput); // worker for the input buffer