diff --git a/module/Library/String.cpp b/module/Library/String.cpp index 61aea998..cb73e8d6 100644 --- a/module/Library/String.cpp +++ b/module/Library/String.cpp @@ -789,7 +789,10 @@ static String StrImplode(StackStrF & sep, Array & arr) } else { - buf.pop_back(); // Remove trailing separator + for (SQInteger n = 0; n < sep.mLen; ++n) + { + buf.pop_back(); // Remove trailing separator + } } // Return the string return buf;