diff options
Diffstat (limited to 'sapi/activescript/scriptengine.cpp')
-rw-r--r-- | sapi/activescript/scriptengine.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sapi/activescript/scriptengine.cpp b/sapi/activescript/scriptengine.cpp index da4f51baa5..ca751c2a5f 100644 --- a/sapi/activescript/scriptengine.cpp +++ b/sapi/activescript/scriptengine.cpp @@ -116,7 +116,12 @@ class TWideString { return ret; } - int ansi_len(void) { return m_ansi_strlen; } + int ansi_len(void) { + /* force conversion if it has not already occurred */ + if (m_ansi == NULL) + ansi_string(); + return m_ansi_strlen; + } static BSTR bstr_from_ansi(char *ansi) { OLECHAR *ole = NULL; |