diff options
Diffstat (limited to 'src/lib/util/corefile.c')
-rw-r--r-- | src/lib/util/corefile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/util/corefile.c b/src/lib/util/corefile.c index 491c35cacbf..4ada0f36aae 100644 --- a/src/lib/util/corefile.c +++ b/src/lib/util/corefile.c @@ -888,7 +888,7 @@ int CLIB_DECL core_fprintf(core_file *f, const char *fmt, ...) assumptions about path separators -------------------------------------------------*/ -astring &core_filename_extract_base(astring &result, const char *name, bool strip_extension) +std::string &core_filename_extract_base(std::string &result, const char *name, bool strip_extension) { /* find the start of the name */ const char *start = name + strlen(name); @@ -896,11 +896,11 @@ astring &core_filename_extract_base(astring &result, const char *name, bool stri start--; /* copy the rest into an astring */ - result.cpy(start); + result.assign(start); /* chop the extension if present */ if (strip_extension) - result.substr(0, result.rchr(0, '.')); + result = result.substr(0, result.find_last_of('.')); return result; } |