]> git.xonotic.org Git - xonotic/darkplaces.git/commit
com: replace BSD strlcpy and strlcat
authorbones_was_here <bones_was_here@xonotic.au>
Wed, 13 Dec 2023 07:16:24 +0000 (17:16 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sun, 21 Jan 2024 06:56:58 +0000 (16:56 +1000)
commitb60133483aa561097865246a9f94b1e51798ce10
tree11e15897bca3a06fd3bd7798b9bb13a9fc2fa642
parent906474fc025ff5b0b8799d9045a581bceafd2e7d
com: replace BSD strlcpy and strlcat

Compared to BSD strlcpy and strlcat, dp_strlcpy and dp_strlcat are
faster, never crash, and have a more useful return (DP didn't use the
strlcpy return at all), see included docs.

Adds dp_stpecpy() for efficient chain copying and dp_ustr2stp() for
copying measured byte sequences (unterminated strings) to strings.

Replaces the only use of the strlcat() return with dp_stpecpy().

Updates the forbidden string functions list.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
common.c
common.h
prvm_exec.c