summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
Diffstat (limited to 'legacy')
-rw-r--r--legacy/evas/src/bin/evas_cserve2_client.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/legacy/evas/src/bin/evas_cserve2_client.c b/legacy/evas/src/bin/evas_cserve2_client.c
index 7368760d53..5ced01764e 100644
--- a/legacy/evas/src/bin/evas_cserve2_client.c
+++ b/legacy/evas/src/bin/evas_cserve2_client.c
@@ -37,7 +37,12 @@ _read_line(char *buf, int size)
37 int len; 37 int len;
38 char *c; 38 char *c;
39 39
40 fgets(buf, size, stdin); 40 if (!fgets(buf, size, stdin))
41 {
42 buf[0] = 0;
43 return 0;
44 }
45
41 c = strchr(buf, '#'); 46 c = strchr(buf, '#');
42 if (c) 47 if (c)
43 *c = '\0'; 48 *c = '\0';
@@ -354,7 +359,8 @@ int main(void)
354 skip_cmd = 0; 359 skip_cmd = 0;
355 else 360 else
356 printf("\n> "); 361 printf("\n> ");
357 fgets(cmd, sizeof(cmd), stdin); 362 if (!fgets(cmd, sizeof(cmd), stdin))
363 break;
358 len = strlen(cmd) - 1; 364 len = strlen(cmd) - 1;
359 cmd[len] = '\0'; 365 cmd[len] = '\0';
360 366