ICU-3036 Initialize the pointers

X-SVN-Rev: 12530
This commit is contained in:
George Rhoten 2003-06-19 01:02:46 +00:00
parent 41852125a3
commit f356148d72

View File

@ -204,9 +204,11 @@ static const UChar *fetchErrorName(UErrorCode err)
{
if (!gInfoMessages) {
gInfoMessages = (UChar **)malloc((U_ERROR_WARNING_LIMIT-U_ERROR_WARNING_START)*sizeof(UChar*));
memset(gInfoMessages, 0, (U_ERROR_WARNING_LIMIT-U_ERROR_WARNING_START)*sizeof(UChar*));
}
if (!gErrMessages) {
gErrMessages = (UChar **)malloc(U_ERROR_LIMIT*sizeof(UChar*));
memset(gErrMessages, 0, U_ERROR_LIMIT*sizeof(UChar*));
}
if(err>=0)
return gErrMessages[err];