Skip to content

Commit 86f3edc

Browse files
authored
Merge pull request #816 from JacobBarthelmeh/test
fix inet_addr accounting for '.' character
2 parents 989d34f + 702291b commit 86f3edc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

wolfssh/test.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@
150150
a[i] += cp[j] - '0';
151151
j++;
152152
}
153+
if (cp[j] == '.') {
154+
j++; /* increment past '.' */
155+
}
153156
}
154157
ret = ((a[3]<<24) + (a[2]<<16) + (a[1]<<8) + a[0]) ;
155158
return(ret) ;

0 commit comments

Comments
 (0)