Skip to content

Commit f556e32

Browse files
committed
fixed glitch that allowed duplicate GFF attributes
1 parent 0731d0a commit f556e32

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

gclib/gff.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,7 @@ void GffObj::copyAttrs(GffObj* from) { //typically from is the parent gene, and
14901490
bool haveit=false;
14911491
for (int ai=0;ai<this->attrs->Count();++ai) {
14921492
//do we have it already?
1493-
if (aid==this->attrs->Get(i)->attr_id) {
1493+
if (aid==this->attrs->Get(ai)->attr_id) {
14941494
haveit=true;
14951495
break; //skip this, don't replace
14961496
}

gclib/gff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ enum GffPrintMode {
340340

341341
class GffAttrs:public GList<GffAttr> {
342342
public:
343-
GffAttrs():GList<GffAttr>(false,true,false) { }
343+
GffAttrs():GList<GffAttr>(false,true,true) { }
344344
void add_or_update(GffNames* names, const char* attrname, const char* val) {
345345
int aid=names->attrs.getId(attrname);
346346
if (aid>=0) {

0 commit comments

Comments
 (0)