8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08a0746 commit 44622e3Copy full SHA for 44622e3
icu4c/source/i18n/measunit.cpp
@@ -2650,7 +2650,13 @@ const char *MeasureUnit::getSubtype() const {
2650
}
2651
2652
const char *MeasureUnit::getIdentifier() const {
2653
- return fImpl ? fImpl->identifier.data() : gSubTypes[getOffset()];
+ if (fImpl){
2654
+ return fImpl->identifier.data();
2655
+ } else if (fTypeId < 0 || fSubTypeId < 0) {
2656
+ return "";
2657
+ } else {
2658
+ return gSubTypes[getOffset()];
2659
+ }
2660
2661
2662
bool MeasureUnit::operator==(const UObject& other) const {
0 commit comments