// stringpool.h -- a string pool for gold -*- C++ -*-
-// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
section_offset_type
get_offset_from_key(Key k) const
{
- gold_assert(k < this->key_to_offset_.size());
- return this->key_to_offset_[k];
+ gold_assert(k <= this->key_to_offset_.size());
+ return this->key_to_offset_[k - 1];
}
// Get the size of the string table. This returns the number of