return on error to prevent crash

This commit is contained in:
Douglas Clowes
2012-11-29 12:48:19 +11:00
parent 53ce7dc584
commit f0669d6bda

View File

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