Skip to content

Commit

Permalink
Update judge_client.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
zhblue authored Nov 16, 2024
1 parent dfd5008 commit 16e57ff
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions trunk/core/judge_client/judge_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -830,10 +830,14 @@ void make_diff_out_simple(FILE *f1, FILE *f2,char * prefix, int c1, int c2, cons
fprintf(diff,"|");
if(row==1){
fprintf(diff,"%s",prefix);
buf1[0]=c1; // patch buf1 with c1
if(!feof(f1)&&fgets(buf1+1,BUFFER_SIZE-2,f1)){
fprintSafe(diff,buf1);
}
if(c1!='\n'){
buf1[0]=c1; // patch buf1 with c1
if(!feof(f1)&&fgets(buf1+1,BUFFER_SIZE-2,f1)){
fprintSafe(diff,buf1);
}
}else{
fprintf(diff,"");
}
}else if(!feof(f1)&&fgets(buf1,BUFFER_SIZE-1,f1)){
fprintSafe(diff,buf1);
}else{
Expand Down

0 comments on commit 16e57ff

Please sign in to comment.