Root/package/soloscli/patches/001-newline.patch

1--- a/soloscli/soloscli.c
2+++ b/soloscli/soloscli.c
3@@ -238,7 +238,11 @@
4     }
5     if (strcmp(buf,pid) == 0) {
6 /* printf("Sequence matches.\n"); */
7- printf("%s",bufp);
8+ if(buf[(len-1)] == '\n'){
9+ printf("%s",bufp);
10+ } else {
11+ printf("%s\n",bufp);
12+ }
13     } else {
14         printf("Sequence incorrect.\n");
15         buf[i] = '\n';
16

Archive Download this file



interactive