Code

Fix wrong delete operator in domstring.cpp.
authortweenk <tweenk@users.sourceforge.net>
Sun, 10 May 2009 18:19:37 +0000 (18:19 +0000)
committertweenk <tweenk@users.sourceforge.net>
Sun, 10 May 2009 18:19:37 +0000 (18:19 +0000)
src/dom/domstring.cpp

index eb00afa8ec72d2cb6db74030293ef781b4555811..e562f079f1b16b5ee8dd036cbfe74acdb0b255c4 100644 (file)
@@ -65,7 +65,7 @@ DOMString::DOMString(const char *str)
 DOMString::~DOMString()
 {
     if (cstring)
-        delete cstring;
+        delete[] cstring;
 }
 
 
@@ -263,7 +263,7 @@ void DOMString::clear()
     chars.clear();
     if (cstring)
         {
-        delete cstring;
+        delete[] cstring;
         cstring = NULL;
         }
 }
@@ -293,7 +293,7 @@ DOMString DOMString::substr(unsigned long start, unsigned long end) const
 const char *DOMString::c_str()
 {
     if (cstring)
-        delete cstring;
+        delete[] cstring;
 
     int length = chars.size();