Skip to content

Commit 353866d

Browse files
alexfhroubert
authored andcommitted
ICU-23122 Fix a comparison error
The error was found by clang's recently improved -Wtautological-overlap-compare diagnostic.
1 parent 5cff179 commit 353866d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

icu4c/source/tools/genrb/genrb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ main(int argc,
163163
}
164164
if(options[FORMAT_VERSION].doesOccur) {
165165
const char *s = options[FORMAT_VERSION].value;
166-
if(uprv_strlen(s) != 1 || (s[0] < '1' && '3' < s[0])) {
166+
if(uprv_strlen(s) != 1 || (s[0] < '1' || '3' < s[0])) {
167167
fprintf(stderr, "%s: unsupported --formatVersion %s\n", argv[0], s);
168168
illegalArg = true;
169169
} else if(s[0] == '1' &&

0 commit comments

Comments
 (0)