diff options
Diffstat (limited to 'source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp')
-rw-r--r-- | source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp b/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp index 8209d23c0aee6..f2a74b05fe265 100644 --- a/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp +++ b/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp @@ -103,9 +103,13 @@ ObjectContainerBSDArchive::Object::Extract (const DataExtractor& data, lldb::off } else { - // Strip off any spaces (if the object file name contains spaces it - // will use the extended format above). - str.erase (str.find(' ')); + // Strip off any trailing spaces. + const size_t last_pos = str.find_last_not_of(' '); + if (last_pos != std::string::npos) + { + if (last_pos + 1 < 16) + str.erase (last_pos + 1); + } ar_name.SetCString(str.c_str()); } |