mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
getdata: stop looking after interesting field
The nth_field function continued looking for words after they where known not to be interesting. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
5f59daa692
commit
b918e9157d
1 changed files with 2 additions and 0 deletions
|
|
@ -188,6 +188,8 @@ int nth_field(int n, char *restrict dest, const char *restrict src)
|
|||
} else {
|
||||
if (j == 0) {
|
||||
wordn++;
|
||||
if (n + 1 < wordn)
|
||||
break;
|
||||
}
|
||||
if (wordn == n) {
|
||||
dest[j] = src[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue