Fixed thinko: image modifications don't start at the last tilde.

This commit is contained in:
Guillaume Melquiond 2010-10-31 17:54:14 +00:00
parent 5d39d878a3
commit bf6d070e2d

View file

@ -2385,7 +2385,7 @@ std::string get_image(const vconfig& cfg, unit_map::iterator speaker)
if (image.empty() && speaker != resources::units->end())
{
image = speaker->profile();
std::string::size_type offset = image.find_last_of('~');
std::string::size_type offset = image.find('~');
offset = image.find_last_of('/', offset);
if (offset != std::string::npos) {
image.insert(offset, "/transparent");
@ -2406,7 +2406,7 @@ std::string get_image(const vconfig& cfg, unit_map::iterator speaker)
}
else if (!image.empty())
{
std::string::size_type offset = image.find_last_of('~');
std::string::size_type offset = image.find('~');
offset = image.find_last_of('/', offset);
if (offset != std::string::npos) {
image.insert(offset, "/transparent");