X-Git-Url: https://git.donarmstrong.com/?p=rsem.git;a=blobdiff_plain;f=Profile.h;h=ecf059c0ea45cfb2e35c1255a89d314c0a054d62;hp=899f0d035a32d17ddd1feeb7222ec359e34399c7;hb=92b24279a3ecc72946e7e7c23149ad0d181f373a;hpb=a95154919f950f86de9104b2b9dcf1f0c7e83387 diff --git a/Profile.h b/Profile.h index 899f0d0..ecf059c 100644 --- a/Profile.h +++ b/Profile.h @@ -132,7 +132,7 @@ void Profile::collect(const Profile& o) { void Profile::read(FILE *fi) { int tmp_prolen, tmp_ncodes; - fscanf(fi, "%d %d", &tmp_prolen, &tmp_ncodes); + assert(fscanf(fi, "%d %d", &tmp_prolen, &tmp_ncodes) == 2); assert(tmp_ncodes == NCODES); if (tmp_prolen != proLen) { delete[] p; @@ -145,7 +145,7 @@ void Profile::read(FILE *fi) { for (int i = 0; i < proLen; i++) for (int j = 0; j < NCODES; j++) for (int k = 0; k < NCODES; k++) - fscanf(fi, "%lf", &p[i][j][k]); + assert(fscanf(fi, "%lf", &p[i][j][k]) == 1); } void Profile::write(FILE* fo) {