From 2247b7fad552d75eb0e0f4407970aa76f64b8942 Mon Sep 17 00:00:00 2001 From: plutooo Date: Wed, 31 Jul 2013 10:20:03 -0700 Subject: Added chat windows, and some clean up. --- testing/toxic/prompt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'testing/toxic/prompt.c') diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c index 22d9eb9e..52e9bde0 100644 --- a/testing/toxic/prompt.c +++ b/testing/toxic/prompt.c @@ -221,7 +221,7 @@ static void execute(ToxWindow* self, char* cmd) { msg[0] = 0; msg++; - if(m_sendmessage(atoi(id), (uint8_t*) msg, strlen(msg)+1) != 1) { + if(m_sendmessage(atoi(id), (uint8_t*) msg, strlen(msg)+1) < 0) { wprintw(self->window, "Error occurred while sending message.\n"); } else { @@ -312,6 +312,8 @@ static void prompt_onInit(ToxWindow* self) { ToxWindow new_prompt() { ToxWindow ret; + memset(&ret, 0, sizeof(ret)); + ret.onKey = &prompt_onKey; ret.onDraw = &prompt_onDraw; ret.onInit = &prompt_onInit; -- cgit v1.2.3