From 9cbe6c982d18fdd0ef12d45ba2cfe6629dd4b361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Courr=C3=A8ges-Anglas?= Date: Fri, 22 Feb 2013 19:46:59 +0100 Subject: receive_command_result() fixup * forgot a break statement when moving things around * braino in comment: '1' is RET_SUCCESS, '0' is RET_FAILURE --- src/communications.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/communications.c b/src/communications.c index be406e6..76f3b98 100644 --- a/src/communications.c +++ b/src/communications.c @@ -76,8 +76,8 @@ receive_command_result (Window w) /* * We can receive: * - an empty string, indicating a success but no output - * - a string starting with '0', indicating a success and an output - * - a string starting with '1', indicating a failure and an optional output + * - a string starting with '1', indicating a success and an output + * - a string starting with '0', indicating a failure and an optional output */ switch (result[0]) { @@ -93,6 +93,7 @@ receive_command_result (Window w) case '1': /* Command succeeded, print the output */ printf ("%s\n", &result[1]); return_status = RET_SUCCESS; + break; default: /* We probably got junk, so ignore it */ return_status = RET_FAILURE; } -- cgit v1.2.3