From 7083c898f099fb7e00618ce572201b6e92b39c97 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 30 Jun 2004 03:21:14 +0000 Subject: [PATCH] Fixed CString bug --- dlls/engine/CString.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/engine/CString.h b/dlls/engine/CString.h index 137be93f..c5e315bc 100755 --- a/dlls/engine/CString.h +++ b/dlls/engine/CString.h @@ -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];