Skip to content

Commit 3ff7e68

Browse files
committed
fixed overflow error
1 parent 8c3d69c commit 3ff7e68

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

client.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ void c_show_cmd() {
797797
if (res != m.u.size)
798798
error("Error in show_cmd - line size");
799799

800-
printf("%s", string);
800+
printf("%s\n", string);
801801
free(string);
802802
return;
803803
default:

jobs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,12 @@ void s_send_cmd(int s, int jobid) {
303303

304304
if (p == 0) {
305305
char tmp[50];
306-
sprintf(tmp, "Job %i not finished or not running.\n", jobid);
306+
sprintf(tmp, "Job %i not found in the queue.\n", jobid);
307307
send_list_line(s, tmp);
308308
return;
309309
}
310310
cmd = (char *) malloc(strlen(p->command) + 1);
311-
sprintf(cmd, "%s\n", p->command);
311+
sprintf(cmd, "%s", p->command);
312312
send_list_line(s, cmd);
313313
free(cmd);
314314
}

0 commit comments

Comments
 (0)