diff options
Diffstat (limited to 'lib/inet_pton.c')
-rw-r--r-- | lib/inet_pton.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/inet_pton.c b/lib/inet_pton.c index 7d3c698..176cc95 100644 --- a/lib/inet_pton.c +++ b/lib/inet_pton.c @@ -112,7 +112,8 @@ inet_pton4(const char *src, unsigned char *dst) pch = strchr(digits, ch); if(pch) { - unsigned int val = *tp * 10 + (unsigned int)(pch - digits); + unsigned int val = (unsigned int)(*tp * 10) + + (unsigned int)(pch - digits); if(saw_digit && *tp == 0) return (0); |