summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testing/toxic/chat.c2
-rw-r--r--testing/toxic/prompt.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/testing/toxic/chat.c b/testing/toxic/chat.c
index 7262e722..bad4cbfa 100644
--- a/testing/toxic/chat.c
+++ b/testing/toxic/chat.c
@@ -127,7 +127,7 @@ static void chat_onKey(ToxWindow* self, int key) {
127 wattroff(ctx->history, COLOR_PAIR(1)); 127 wattroff(ctx->history, COLOR_PAIR(1));
128 wprintw(ctx->history, "%s\n", ctx->line); 128 wprintw(ctx->history, "%s\n", ctx->line);
129 } 129 }
130 if(m_sendmessage(ctx->friendnum, (uint8_t*) ctx->line, strlen(ctx->line)+1) < 0) { 130 if(m_sendmessage(ctx->friendnum, (uint8_t*) ctx->line, strlen(ctx->line)+1) == 0) {
131 wattron(ctx->history, COLOR_PAIR(3)); 131 wattron(ctx->history, COLOR_PAIR(3));
132 wprintw(ctx->history, " * Failed to send message.\n"); 132 wprintw(ctx->history, " * Failed to send message.\n");
133 wattroff(ctx->history, COLOR_PAIR(3)); 133 wattroff(ctx->history, COLOR_PAIR(3));
diff --git a/testing/toxic/prompt.c b/testing/toxic/prompt.c
index 20f6b480..670a93a2 100644
--- a/testing/toxic/prompt.c
+++ b/testing/toxic/prompt.c
@@ -45,7 +45,7 @@ static void execute(ToxWindow* self, char* u_cmd) {
45 int i; 45 int i;
46 int newlines = 0; 46 int newlines = 0;
47 char cmd[256] = {0}; 47 char cmd[256] = {0};
48 for(i = 0; i < strlen(prompt_buf); i++) 48 for(i = 0; i < strlen(prompt_buf); i++)
49 { 49 {
50 if (u_cmd[i] == '\n') 50 if (u_cmd[i] == '\n')
51 ++newlines; 51 ++newlines;
@@ -260,7 +260,7 @@ static void execute(ToxWindow* self, char* u_cmd) {
260 msg[0] = 0; 260 msg[0] = 0;
261 msg++; 261 msg++;
262 262
263 if(m_sendmessage(atoi(id), (uint8_t*) msg, strlen(msg)+1) < 0) { 263 if(m_sendmessage(atoi(id), (uint8_t*) msg, strlen(msg)+1) == 0) {
264 wprintw(self->window, "Error occurred while sending message.\n"); 264 wprintw(self->window, "Error occurred while sending message.\n");
265 } 265 }
266 else { 266 else {
@@ -338,7 +338,7 @@ static void print_usage(ToxWindow* self) {
338 wprintw(self->window, " myid : Print your ID\n"); 338 wprintw(self->window, " myid : Print your ID\n");
339 wprintw(self->window, " quit/exit : Exit program\n"); 339 wprintw(self->window, " quit/exit : Exit program\n");
340 wprintw(self->window, " help : Print this message again\n"); 340 wprintw(self->window, " help : Print this message again\n");
341 wprintw(self->window, " clear : Clear this window\n"); 341 wprintw(self->window, " clear : Clear this window\n");
342 342
343 wattron(self->window, A_BOLD); 343 wattron(self->window, A_BOLD);
344 wprintw(self->window, "TIP: Use the TAB key to navigate through the tabs.\n\n"); 344 wprintw(self->window, "TIP: Use the TAB key to navigate through the tabs.\n\n");