From 7b73eec82b86221e4352d0b5b325fa145a9fd873 Mon Sep 17 00:00:00 2001 From: Christoffer Lerno Date: Wed, 25 Dec 2024 23:40:58 +0100 Subject: [PATCH] Prevent DString from being initialized with "". --- lib/std/core/dstring.c3 | 3 ++- releasenotes.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/std/core/dstring.c3 b/lib/std/core/dstring.c3 index d42f16507..6fe1a0b92 100644 --- a/lib/std/core/dstring.c3 +++ b/lib/std/core/dstring.c3 @@ -1,7 +1,8 @@ module std::core::dstring; import std::io; -distinct DString (OutStream) = void*; +distinct DString (OutStream) = DStringOpaque*; +distinct DStringOpaque = void; const usz MIN_CAPACITY @private = 16; diff --git a/releasenotes.md b/releasenotes.md index 9278bb257..554a25669 100644 --- a/releasenotes.md +++ b/releasenotes.md @@ -22,6 +22,7 @@ - Fix `--list-operators` CLI command printing underscore (_) and hash (#). - Fix bug in temp allocator when temp memory is exhausted and allocation needs overaligned mem. #1715 - Incorrectly handles distinct enums and pointers with '+=' and '-=' #1717. +- Prevent DString from being initialized with "". ### Stdlib changes - Increase BitWriter.write_bits limit up to 32 bits.