summaryrefslogtreecommitdiff
path: root/testing/toxic/prompt.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-07-31 10:31:21 -0700
committerirungentoo <irungentoo@gmail.com>2013-07-31 10:31:21 -0700
commit3c177d6a835b7849cc6a0827a5f7269f10dd4ba9 (patch)
treee50a5bf2b4e3728de65eef0b21646f121aadb250 /testing/toxic/prompt.c
parent14bf0699e77de713816103328ab05c6971858cff (diff)
parent2247b7fad552d75eb0e0f4407970aa76f64b8942 (diff)
Merge pull request #213 from plutooo/master
Added chat windows, and some clean up.
Diffstat (limited to 'testing/toxic/prompt.c')
-rw-r--r--testing/toxic/prompt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c
index 0cd10730..bdfcb880 100644
--- a/testing/toxic/prompt.c
+++ b/testing/toxic/prompt.c
@@ -221,7 +221,7 @@ static void execute(ToxWindow* self, char* cmd) {
221 msg[0] = 0; 221 msg[0] = 0;
222 msg++; 222 msg++;
223 223
224 if(m_sendmessage(atoi(id), (uint8_t*) msg, strlen(msg)+1) != 1) { 224 if(m_sendmessage(atoi(id), (uint8_t*) msg, strlen(msg)+1) < 0) {
225 wprintw(self->window, "Error occurred while sending message.\n"); 225 wprintw(self->window, "Error occurred while sending message.\n");
226 } 226 }
227 else { 227 else {
@@ -312,6 +312,8 @@ static void prompt_onInit(ToxWindow* self) {
312ToxWindow new_prompt() { 312ToxWindow new_prompt() {
313 ToxWindow ret; 313 ToxWindow ret;
314 314
315 memset(&ret, 0, sizeof(ret));
316
315 ret.onKey = &prompt_onKey; 317 ret.onKey = &prompt_onKey;
316 ret.onDraw = &prompt_onDraw; 318 ret.onDraw = &prompt_onDraw;
317 ret.onInit = &prompt_onInit; 319 ret.onInit = &prompt_onInit;