mirror of
https://github.com/yarrick/iodine.git
synced 2025-12-06 12:21:46 +00:00
Added new test, found and fixed an actual bug
This commit is contained in:
@@ -41,8 +41,12 @@ build_hostname(char *buf, size_t buflen,
|
||||
b = buf;
|
||||
b += strlen(buf);
|
||||
|
||||
/* move b back one step to see if the dot is there */
|
||||
b--;
|
||||
if (*b != '.')
|
||||
*b++ = '.';
|
||||
*++b = '.';
|
||||
b++;
|
||||
/* move b ahead of the string so we can copy to it */
|
||||
|
||||
strncpy(b, topdomain, strlen(topdomain)+1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user