diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-03-28 20:38:13 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2009-03-28 20:38:13 +0000 |
commit | b2240ee52a358de3ec99b8be85e9c43a402eb922 (patch) | |
tree | 7b2422c94af266c426c9eb566167b619d8ed89e1 /nuttx | |
parent | 357abb52b8ce22933d6b5512097989a85b149828 (diff) | |
download | px4-nuttx-b2240ee52a358de3ec99b8be85e9c43a402eb922.tar.gz px4-nuttx-b2240ee52a358de3ec99b8be85e9c43a402eb922.tar.bz2 px4-nuttx-b2240ee52a358de3ec99b8be85e9c43a402eb922.zip |
Fix parsing of port number
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1659 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r-- | nuttx/netutils/uiplib/uip_parsehttpurl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nuttx/netutils/uiplib/uip_parsehttpurl.c b/nuttx/netutils/uiplib/uip_parsehttpurl.c index 22994a226..de9efe58c 100644 --- a/nuttx/netutils/uiplib/uip_parsehttpurl.c +++ b/nuttx/netutils/uiplib/uip_parsehttpurl.c @@ -109,8 +109,9 @@ int uip_parsehttpurl(const char *url, uint16 *port, if (*src == ':') { uint16 accum = 0; - src++; - while (*src >= '0' && *src <= 9) + src++; /* Skip over the colon */ + + while (*src >= '0' && *src <= '9') { accum = 10*accum + *src - '0'; src++; |