another fix

This commit is contained in:
Matthew 2026-06-27 14:28:07 +10:00
parent f49d47fcac
commit 253be45581

View File

@ -146,7 +146,7 @@ string
AllocTerminated(T)(T target) if(StringType!T)
{
u8[] str = Alloc!(u8)(target.length+1);
str[0 .. target.length] = str[];
str[0 .. target.length] = cast(u8[])target[];
str[str.length-1] = '\0';
return cast(string)str[0 .. str.length-1];
}