libs/libc: support explicit bases up to 36

The strto* interfaces document explicit bases in the range 2 through 36, and lib_isbasedigit() already supports alphabetic digits through base 36.  However, lib_checkbase() rejects every explicit base above 26 with EINVAL.

Raise the validation limit to 36 so the conversion interfaces accept the full documented range while continuing to reject base 37 and above.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
This commit is contained in:
hanzhijian 2026-08-01 14:35:32 +08:00
parent 8cec1d01db
commit 9ea7bc457e

View file

@ -104,7 +104,7 @@ int lib_checkbase(int base, FAR const char **pptr)
/* Check for incorrect bases. */
else if (base < 2 || base > 26)
else if (base < 2 || base > 36)
{
return -1; /* Means incorrect base */
}