Fix bug when length was queried before the string was converted.

This commit is contained in:
Wez Furlong 2002-05-22 00:02:35 +00:00
parent 762effcf60
commit 139fd6a8e4

View file

@ -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;