--- parser3/src/main/pa_pool.C 2002/10/15 15:12:57 1.57 +++ parser3/src/main/pa_pool.C 2003/01/21 15:51:14 1.59 @@ -1,11 +1,11 @@ /** @file Parser: pool class. - Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_POOL_C="$Date: 2002/10/15 15:12:57 $"; +static const char* IDENT_POOL_C="$Date: 2003/01/21 15:51:14 $"; #include "pa_pool.h" #include "pa_exception.h" @@ -21,6 +21,9 @@ Pool::Pool(void *astorage) : } void *Pool::copy(const void *buf, const size_t size) { + if(!buf || !size) + return 0; + void *result=malloc(size); memcpy(result, buf, size); return result;