File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -112,13 +112,13 @@ sam_rec::sam_rec(const string &line) {
112112 istringstream iss; // ADS: change to set the buffer from "line"
113113 iss.rdbuf()->pubsetbuf(const_cast<char*>(line.c_str()), line.size());*/
114114 istringstream iss (line); // ADS: unfortunate macos stuff?
115- uint32_t will_become_mapq = 0 ; // to not read mapq as character
116- // since it's uint8_t
115+ int32_t will_become_mapq = 0 ; // to not read mapq as character
116+ // since it's uint8_t
117117 if (!(iss >>
118118 qname >> flags >> rname >> pos >> will_become_mapq >>
119119 cigar >> rnext >> pnext >> tlen >> seq >> qual))
120120 throw runtime_error (" incorrect SAM record:\n " + line);
121- if (mapq > 255 )
121+ if (will_become_mapq < 0 || will_become_mapq > 255 )
122122 throw runtime_error (" invalid mapq in SAM record: " + line);
123123 mapq = static_cast <uint8_t >(will_become_mapq);
124124
You can’t perform that action at this time.
0 commit comments