* stringpool.cc (Stringpool_template::add_with_length): Set key to
authorIan Lance Taylor <ian@airs.com>
Thu, 24 Jul 2008 07:23:20 +0000 (07:23 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 24 Jul 2008 07:23:20 +0000 (07:23 +0000)
commit5778530ea76fb119f3a77b0c699aa938369bc063
tree30507cbded91cda28da55ea2586bc28dc874676c
parent7f649c59d1863d01c97a920232f86fdacaac2199
* stringpool.cc (Stringpool_template::add_with_length): Set key to
array size plus one.
(Stringpool_template::set_string_offsets): Subtract one from key
before using it as an array index.
(Stringpool_template::get_offset_with_length): Likewise.
(Stringpool_template::write_to_buffer): Likewise.
* stringpool.h (Stringpool_template::get_offset_from_key):
Likewise.
gold/ChangeLog
gold/stringpool.cc
gold/stringpool.h