mirror of
https://github.com/tbamud/tbamud.git
synced 2026-02-19 18:11:45 +01:00
Prevent compiler warnings and potential OLC setting string truncation.
- Prevented compiler warnings when using ’-Wtautological-pointer-compare’ on development system (Darwin) - Prevented possible string truncation when adding a newline to an OLC setting string.
This commit is contained in:
@@ -86,7 +86,7 @@ char *str_udupnl(const char *txt)
|
||||
ptr = (txt && *txt) ? txt : undef;
|
||||
CREATE(str, char, strlen(ptr) + 3);
|
||||
|
||||
strlcpy(str, ptr, strlen(ptr));
|
||||
strlcpy(str, ptr, strlen(str));
|
||||
strcat(str, "\r\n");
|
||||
|
||||
return str;
|
||||
|
||||
Reference in New Issue
Block a user