From af29d7dab238ff074d0cfeb8b51019867f869a17 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Wed, 14 Oct 2015 20:23:40 -0400 Subject: [PATCH] Bring from 5_1_0: don't use insert with RString. --- src/RageFileManager.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/RageFileManager.cpp b/src/RageFileManager.cpp index ba5293245a..7ebe688e65 100644 --- a/src/RageFileManager.cpp +++ b/src/RageFileManager.cpp @@ -376,8 +376,14 @@ static void NormalizePath( RString &sPath ) { FixSlashesInPlace( sPath ); CollapsePath( sPath, true ); - if( sPath.size() == 0 || sPath[0] != '/' ) - sPath.insert( sPath.begin(), '/' ); + if (sPath.size() == 0) + { + sPath = '/'; + } + else if (sPath[0] != '/') + { + sPath = '/' + sPath; + } } bool ilt( const RString &a, const RString &b ) { return a.CompareNoCase(b) < 0; }