Ignore:
Timestamp:
Mar 15, 2006, 2:26:37 PM (19 years ago)
Author:
eseidel
Message:

2006-03-15 Eric Seidel <[email protected]>

Reviewed by mjs.

Fix CString copy constructor, fixes Date.parse("") on Win32.

  • kjs/date_object.cpp: (KJS::DateProtoFunc::callAsFunction):
  • kjs/ustring.cpp: (KJS::CString::CString): (KJS::CString::operator=):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/ustring.cpp

    r13294 r13311  
    7070{
    7171  length = b.length;
    72   if (length > 0 && b.data) {
     72  if (b.data) {
    7373    data = new char[length+1];
    7474    memcpy(data, b.data, length + 1);
    7575  }
    76   else {
     76  else
    7777    data = 0;
    78   }
    7978}
    8079
     
    120119    delete [] data;
    121120  length = str.length;
    122   if (length > 0 && str.data) {
     121  if (str.data) {
    123122    data = new char[length + 1];
    124123    memcpy(data, str.data, length + 1);
    125124  }
    126   else {
     125  else
    127126    data = 0;
    128   }
    129127
    130128  return *this;
Note: See TracChangeset for help on using the changeset viewer.