diff --git a/dlib/alloc.d b/dlib/alloc.d index 84a4d11..5e91045 100644 --- a/dlib/alloc.d +++ b/dlib/alloc.d @@ -143,7 +143,7 @@ Alloc(string target) } string -AllocEscaped(char[] target) +AllocTerminated(char[] target) { u8[] str = Alloc!(u8)(target.length+1); str[0 .. target.length] = str[]; @@ -949,7 +949,7 @@ bool MallocCheck() unittest { { - string zeroed = AllocZeroed("Test"); + string zeroed = AllocTerminated("Test"); assert(zeroed.ptr[4] == '\0'); } }