From df49c60c9671e4a28e636964d744c1f59fb6cb68 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 12 Jun 2000 15:00:15 +0000 Subject: Merged from 4.5.0-beta3a --- c/src/exec/score/src/objectcopynamestring.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'c/src/exec/score/src/objectcopynamestring.c') diff --git a/c/src/exec/score/src/objectcopynamestring.c b/c/src/exec/score/src/objectcopynamestring.c index cd0779d546..eb196f3d25 100644 --- a/c/src/exec/score/src/objectcopynamestring.c +++ b/c/src/exec/score/src/objectcopynamestring.c @@ -39,7 +39,10 @@ void _Objects_Copy_name_string( unsigned8 *source_p = (unsigned8 *) source; unsigned8 *destination_p = (unsigned8 *) destination; - do { - *destination_p++ = *source_p; - } while ( *source_p++ ); + *destination_p = '\0'; + if ( source_p ) { + do { + *destination_p++ = *source_p; + } while ( *source_p++ ); + } } -- cgit v1.2.3