count=0;
For (j_v=0; J_v & lt; Csize; J_v + +)
{
Unsigned short code, fact, insize;
Code=charcode [j_v];
Fact=n;
Insize=num;
Int ii=((fact) code * % insize);
Index_s [ii] + +; count++;
}
If (count!=csize)
{
Count=1;
}
//addup
Count=0;
For (int k=0; K & lt; Num. K++)
{
For (int IP=0; IP & lt; 20; Ip++)
{
If (index_s [k]==IP)
{
P [IP] + +;
break;
}
}
The count +=index_s [k].
}
If (count!=csize)
{
Count=1;//debug1
}
Count=0;
For (int kk=1; Kk & lt; 20; Kk++)
{
Count +=p (kk);
}
If (count & gt; Csize)
{
Count=1;
}
This is a thread in the code, and in principle should never perform DEBUG1 that line, where all variables are local variables have no other reference, charcode is an unsigned short an array of type
CodePudding user response:
Found the reason, ii variables beyond, this is even more confused, because insize variable is only 113, and the value of more than 60000 ii? Is ready, change the type to an unsigned int...CodePudding user response:
Code is not complete, can't judge, at first how much value of numCodePudding user response:
The operational benefits?Add the ASSERT (xx & gt;=0 & amp; & Xx & lt; Yy) assertions look
CodePudding user response: