util: handle ampersand.

This commit is contained in:
Alastair Poole 2020-05-18 20:54:27 +01:00
parent 32ec3cc822
commit 6b46fcea2a
1 changed files with 7 additions and 0 deletions

View File

@ -25,6 +25,13 @@ _man2entry(const char *text)
memcpy(&str[i], ">", 4);
i += 4;
}
else if (*p == '&')
{
tmp = realloc(str, (len += 5));
str = tmp;
memcpy(&str[i], "&", 5);
i += 5;
}
else if (*p == '\t')
{
tmp = realloc(str, (len += 8));