Skip to content

Commit f905722

Browse files
committed
LGTM: Fix comparing int8_t with wider type
1 parent d9f647c commit f905722

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tscpp/util/TextView.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ ts::svtoi(TextView src, TextView *out, int base)
134134
zret = svto_radix<16>(src);
135135
break;
136136
default:
137-
while (src.size() && (0 <= (v = svtoi_convert[static_cast<unsigned char>(*src)])) && v < base) {
137+
while (src.size() && (0 <= (v = svtoi_convert[static_cast<unsigned char>(*src)])) && static_cast<int>(v) < base) {
138138
auto n = zret * base + v;
139139
if (n < zret) {
140140
zret = std::numeric_limits<uintmax_t>::max();

0 commit comments

Comments
 (0)