diff options
author | Adrian Thurston <thurston@complang.org> | 2014-12-07 19:13:44 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2014-12-07 19:13:44 -0500 |
commit | 17b04f1c8be3214286500b72141611a2db9e9796 (patch) | |
tree | fa549ea17e9260c36b4206c6edfa9ae386b24f60 /src/parsetree.cc | |
parent | 5b927d9ccf76631d5f1e9149d121f8704d373983 (diff) | |
download | colm-17b04f1c8be3214286500b72141611a2db9e9796.tar.gz |
find the list element pointers instead assuming they are the first item
Diffstat (limited to 'src/parsetree.cc')
-rw-r--r-- | src/parsetree.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/parsetree.cc b/src/parsetree.cc index acb482d1..b7581b75 100644 --- a/src/parsetree.cc +++ b/src/parsetree.cc @@ -170,6 +170,12 @@ int CmpUniqueList2::compare( const UniqueList2 &ut1, const UniqueList2 &ut2 ) return -1; else if ( ut1.value > ut2.value ) return 1; + else { + if ( ut1.attrOff < ut2.attrOff ) + return -1; + else if ( ut1.attrOff > ut2.attrOff ) + return 1; + } return 0; } |