CRITICAL ERROR: bad loop termination

This commit is contained in:
e-ago 2018-04-05 00:42:23 +02:00
parent feeeaf7466
commit 7b2a6b6457

View File

@ -182,6 +182,7 @@ char *cuda_attack(
while(!done) {
numReadPassword = readFilePassword(&hostPasswordInt, &hostPassword, tot_psw, fp);
if(numReadPassword <= 0) { done=1; continue; }
BITCRACKER_CUDA_CHECK( cudaMemcpyAsync(devicePasswordInt, hostPasswordInt, tot_psw * PSW_INT_SIZE * sizeof(uint32_t), cudaMemcpyHostToDevice, stream) );
BITCRACKER_CUDA_CHECK( cudaEventRecord(start, stream) );
if(mac_comparison == 1)
@ -218,7 +219,7 @@ char *cuda_attack(
match=check_match();
if(match) done=1;
if(!feof(fp)) done=1;
if(feof(fp)) done=1;
}
if (fp != stdin)