`uloc_acceptLanguage` does not fall back correctly when the list of available locales does not contain long locales

Description

Here: https://github.com/unicode-org/icu/blob/master/icu4c/source/common/uloc.cpp#L2374

The loop should be:

```
for (;maxLen>0;maxLen--) {
// loop body
}
```

Otherwise, when the list of available locales consists only of 2-letter locales ("fr", "es", "de"), the locale "es_MX" won't fall back to "es".

Assignee

Markus Scherer

Reporter

Filip Filmar

Components

Labels

None

Reviewer

None

Priority

major

Time Needed

Minutes

Fix versions

Configure