X-Git-Url: http://plrg.eecs.uci.edu/git/?p=satlib.git;a=blobdiff_plain;f=zchaff64%2Finc_solver.cpp;h=eda4eb0337988e6b7b721a7a812b3f7fc3c536cf;hp=826f054d1c632ab9f4970e527aab7eaaf9f56391;hb=00598b79d3bc3d604a611ccd19a0f23f5f997597;hpb=b5b78582b335d0807baef611cbce62c6d28df44b diff --git a/zchaff64/inc_solver.cpp b/zchaff64/inc_solver.cpp index 826f054..eda4eb0 100644 --- a/zchaff64/inc_solver.cpp +++ b/zchaff64/inc_solver.cpp @@ -72,13 +72,13 @@ int getInt() { offset = 0; do { ptr=read(0, buffer, sizeof(int)*IS_BUFFERSIZE); - if (ptr == -1) + if (ptr == -1 || ptr == 0) exit(-1); } while(ptr==0); ssize_t bytestoread=(4-(ptr & 3)) & 3; while(bytestoread != 0) { ssize_t p=read(0, &((char *)buffer)[ptr], bytestoread); - if (p == -1) + if (p == -1 || p == 0) exit(-1); bytestoread -= p; ptr += p;