return on error to prevent crash

r1969 | dcl | 2007-05-21 14:16:44 +1000 (Mon, 21 May 2007) | 2 lines
This commit is contained in:
Douglas Clowes
2007-05-21 14:16:44 +10:00
parent 1320d14426
commit ef76d668bf

View File

@@ -634,6 +634,7 @@ static void encodeTerminator(char *result, char *terminator)
if(terminator == NULL) if(terminator == NULL)
{ {
result[0] = '\0'; result[0] = '\0';
return;
} }
len = strlen(terminator); len = strlen(terminator);
sprintf(pBuffer,"0x%x",(int)terminator[0]); sprintf(pBuffer,"0x%x",(int)terminator[0]);