Altered previous truncation fix and added OLC setting for the HUH message.

This commit is contained in:
WyldTBA
2015-04-26 12:33:28 -04:00
parent 68fcdb73bf
commit 4f5c220759
12 changed files with 100 additions and 53 deletions

View File

@@ -82,11 +82,13 @@ char *str_udupnl(const char *txt)
{
char *str = NULL, undef[] = "undefined";
const char *ptr = NULL;
size_t n;
ptr = (txt && *txt) ? txt : undef;
CREATE(str, char, strlen(ptr) + 3);
n = strlen(ptr) + 3;
strlcpy(str, ptr, strlen(str));
CREATE(str, char, n);
strlcpy(str, ptr, n);
strcat(str, "\r\n");
return str;