Fixed field lookup bug.

Fixed bug in CString.
This commit is contained in:
David Anderson
2004-06-30 03:14:39 +00:00
parent 75c5bebc41
commit b67da6965f
2 changed files with 6 additions and 3 deletions

View File

@ -32,7 +32,8 @@ public:
return;
}
Grow(strlen(d));
strcpy(v, d);
if (v)
strcpy(v, d);
}
void clear()
@ -70,6 +71,8 @@ public:
private:
void Grow(int d)
{
if (d<1)
return;
if (d > mSize)
{
char *t = new char[d+1];