mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-15 01:42:37 +00:00
ICU-12652 better fix, see r39114
X-SVN-Rev: 39115
This commit is contained in:
parent
93180d2d73
commit
d9babe5948
1 changed files with 8 additions and 4 deletions
|
@ -2371,10 +2371,14 @@ uloc_acceptLanguageFromHTTP(char *result, int32_t resultAvailable, UAcceptResult
|
|||
}
|
||||
}
|
||||
uprv_sortArray(items.getAlias(), n, sizeof(items[0]), uloc_acceptLanguageCompare, NULL, TRUE, status);
|
||||
LocalArray<const char*> strs(new const char*[n], *status);
|
||||
if(U_FAILURE(*status)) {
|
||||
return -1;
|
||||
}
|
||||
if (U_FAILURE(*status)) {
|
||||
return -1;
|
||||
}
|
||||
LocalMemory<const char*> strs(NULL);
|
||||
if (strs.allocateInsteadAndReset(n) == NULL) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
return -1;
|
||||
}
|
||||
for(i=0;i<n;i++) {
|
||||
#if defined(ULOC_DEBUG)
|
||||
/*fprintf(stderr,"%d: s <%s> q <%g>\n", i, j[i].locale, j[i].q);*/
|
||||
|
|
Loading…
Add table
Reference in a new issue