wangyu- 8 years ago
parent
commit
b9b14f90f5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/rs.c

+ 1 - 1
lib/rs.c

@@ -35,7 +35,7 @@ int rs_decode(void *code,char *data[],int size)
 		return -1;
 	for(int i=0;i<n;i++)
 	{
-		if(k<count)
+		if(i<count)
 			data[i]=data[index[i]];
 		else
 			data[i]=0;