summaryrefslogtreecommitdiff
path: root/fxjs/cjx_object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjx_object.cpp')
-rw-r--r--fxjs/cjx_object.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/fxjs/cjx_object.cpp b/fxjs/cjx_object.cpp
index 80a54fc8a0..49c147ba95 100644
--- a/fxjs/cjx_object.cpp
+++ b/fxjs/cjx_object.cpp
@@ -48,11 +48,9 @@ void CJX_Object::ThrowArgumentMismatchException() const {
}
void CJX_Object::ThrowException(const wchar_t* str, ...) const {
- WideString wsMessage;
va_list arg_ptr;
-
va_start(arg_ptr, str);
- wsMessage.FormatV(str, arg_ptr);
+ WideString wsMessage = WideString::FormatV(str, arg_ptr);
va_end(arg_ptr);
ASSERT(!wsMessage.IsEmpty());