]> git.donarmstrong.com Git - rsem.git/blobdiff - Orientation.h
Added error detection for cases such as a read's two mates having different names...
[rsem.git] / Orientation.h
index 7ff8e87299fc52ce91f94e09bbe77171f087095e..6f31dacbcd2be874ed5a53a73e356bf274193d2f 100644 (file)
@@ -3,6 +3,7 @@
 
 #include<cstdio>
 #include<cstring>
+#include<cassert>
 
 #include "simul.h"
 
@@ -23,7 +24,7 @@ public:
        double getProb(int dir) { return prob[dir]; }
 
        void read(FILE* fi) {
-               fscanf(fi, "%lf", &prob[0]);
+               assert(fscanf(fi, "%lf", &prob[0]) == 1);
                prob[1] = 1.0 - prob[0];
        }