isdigit() returns zero or "non-zero" value, not zero or "one".

This causes building xlxd with gcc makes no problem, but with clang makes
"Read 0 DMR id" message at boot.
This commit is contained in:
SASANO Takayoshi 2019-04-07 14:04:29 +09:00
parent 6d85e1382b
commit 1958afca33

View file

@ -152,7 +152,10 @@ bool CDmridDir::IsValidDmrid(const char *sz)
ok = true;
for ( size_t i = 0; (i < n) && ok; i++ )
{
ok &= ::isdigit(sz[i]);
if ( !::isdigit(sz[i]) )
{
ok = false;
}
}
}
return ok;