Skip to content

Commit 07ab32a

Browse files
authored
fixed crc.java
was missing a "break" on line 67; this resulted in the program giving false positives when the last character of the received codeword is 0. adding the break in the loop terminates at the first non-zero character and sets the flag to 1. this behaviour produces expected results.
1 parent e577715 commit 07ab32a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static void main(String args[])
6464
for(int i=k;i<k+g-1;i++)
6565
{ if(codewordR[i]!=0)
6666
{ flag=1;
67-
67+
break;
6868
}
6969
else
7070
flag=0;

0 commit comments

Comments
 (0)