Fix a copy-paste error

This commit is contained in:
Gregory Nutt 2017-09-20 10:59:00 -06:00
parent dc5be379a9
commit 27773d570b
2 changed files with 8 additions and 1 deletions

View File

@ -84,6 +84,8 @@
static void set_nul_terminator(FAR char *str)
{
/* The first non-decimal character that is not '.' terminates the address */
while ((*str >= '0' && *str <= '9') || *str == '.')
{
str++;

View File

@ -83,7 +83,12 @@
static void set_nul_terminator(FAR char *str)
{
while ((*str >= '0' && *str <= '9') || *str == '.')
/* The first non-hex character that is not ':' terminates the address */
while ((*str >= '0' && *str <= '9') ||
(*str >= 'a' && *str <= 'f') ||
(*str >= 'A' && *str <= 'F') ||
*str == ':')
{
str++;
}