aboutsummaryrefslogtreecommitdiff
path: root/gold/stringpool.h
diff options
context:
space:
mode:
Diffstat (limited to 'gold/stringpool.h')
-rw-r--r--gold/stringpool.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gold/stringpool.h b/gold/stringpool.h
index 1b80842..6fe2066 100644
--- a/gold/stringpool.h
+++ b/gold/stringpool.h
@@ -220,8 +220,8 @@ class Stringpool_template
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