ICU-4092 Fix swap function so that it works like the other swap functions.

X-SVN-Rev: 17053
This commit is contained in:
George Rhoten 2004-12-31 08:29:56 +00:00
parent 15e60bf6ee
commit cc1823680e

View File

@ -267,6 +267,10 @@ ubrk_swap(const UDataSwapper *ds, const void *inData, int32_t length, void *outD
if (status == NULL || U_FAILURE(*status)) {
return 0;
}
if(ds==NULL || inData==NULL || length<-1 || (length>0 && outData==NULL)) {
*status=U_ILLEGAL_ARGUMENT_ERROR;
return 0;
}
//
// Check that the data header is for for break data.