]> git.tdb.fi Git - r2c2.git/commitdiff
Fix an off-by-one comparison error
authorMikko Rasa <tdb@tdb.fi>
Thu, 17 Jan 2013 14:27:03 +0000 (16:27 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 17 Jan 2013 14:27:03 +0000 (16:27 +0200)
source/libr2c2/track.cpp

index 4d8a8fc2210371cc4d96746e77991ed05bef0891..f21aac4d05a438ed6e2dde5b454b548e8e2d86c5 100644 (file)
@@ -288,7 +288,7 @@ void Track::break_links()
 
 Track *Track::get_link(unsigned i) const
 {
-       if(i>links.size())
+       if(i>=links.size())
                throw out_of_range("Track::get_link");
 
        return links[i];