cvs: php4 /sapi/activescript scriptengine.cpp
| From: | Wez Furlong | Date: | Wed, 22 May 2002 00:02:36 +0000 |
| Subject: | cvs: php4 /sapi/activescript scriptengine.cpp | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12051@lists.php.net to get a copy of this message | ||
wez Tue May 21 20:02:36 2002 EDT
Modified files:
/php4/sapi/activescript scriptengine.cpp
Log:
Fix bug when length was queried before the string was converted.
Index: php4/sapi/activescript/scriptengine.cpp
diff -u php4/sapi/activescript/scriptengine.cpp:1.3 php4/sapi/activescript/scriptengine.cpp:1.4
--- php4/sapi/activescript/scriptengine.cpp:1.3 Mon May 20 18:22:57 2002
+++ php4/sapi/activescript/scriptengine.cpp Tue May 21 20:02:35 2002
@@ -15,7 +15,7 @@
| Authors: Wez Furlong <wez@thebrainroom.com> |
+----------------------------------------------------------------------+
*/
-/* $Id: scriptengine.cpp,v 1.3 2002/05/20 22:22:57 wez Exp $ */
+/* $Id: scriptengine.cpp,v 1.4 2002/05/22 00:02:35 wez Exp $ */
/* Implementation Notes:
*
@@ -116,7 +116,12 @@
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;