ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/gclib/gclib/GBam.cpp
(Generate patch)
# Line 280 | Line 280
280   int GBamRecord::find_tag(const char tag[2], uint8_t* & s, char& tag_type) {
281     //position s at the beginning of tag "data" (after the type char)
282     //returns the length of tag data, and tag type in tag_type
283 <   s=bam1_aux(b);
284 <   while (s < b->data + b->data_len) {
283 >   uint8_t* aux_start=bam1_aux(b);
284 >   s=aux_start;
285 >   while (s < aux_start + b->l_aux - 1) {
286       char key[2];
287       key[0] = (char)s[0]; key[1] = (char)s[1];
288       s += 2; tag_type = (char)*s; ++s;
# Line 319 | Line 320
320                           { m_inc = 2; }
321             else if ('i' == sub_type || 'I' == sub_type || 'f' == sub_type)
322                           { m_inc = 4; }
323 <           if (m_inc==0) GError("Error: invalid 'B' array subtype (%c)!\n",sub_type);
323 >           if (m_inc==0)
324 >                 GError("Error: invalid 'B' array subtype (%c)!\n",sub_type);
325             inc += m_inc*n;
326             break;
327         case 'H':

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines