Fix incorrect narrowing type cast

std::string::npos is greater than the maximum value of uint32_t type,
the narrowing cast will make this statement always false.

Found by Clang tautological-constant-out-of-range-compare warning.

Test: N/A
Bug: 72331526
Change-Id: I59b297360ab5672868f2cffc42ec02189275a152
1 file changed