From 2b556b39cece9bf62848d06835f6c427cef339d2 Mon Sep 17 00:00:00 2001 From: Susko3 Date: Sat, 13 Dec 2025 02:29:00 +0100 Subject: [PATCH] Ensure that format strings are null-terminated u8 constants are implicitly null-terminated, but it's not really documented. --- SDL3-CS/SDL3/SDL_error.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SDL3-CS/SDL3/SDL_error.cs b/SDL3-CS/SDL3/SDL_error.cs index 749bbbc..82891aa 100644 --- a/SDL3-CS/SDL3/SDL_error.cs +++ b/SDL3-CS/SDL3/SDL_error.cs @@ -8,14 +8,14 @@ namespace SDL [Macro] public static unsafe SDLBool SDL_Unsupported() { - fixed (byte* fmt = "That operation is not supported"u8) + fixed (byte* fmt = "That operation is not supported\0"u8) return SDL_SetError(fmt, __arglist()); } [Macro] public static unsafe SDLBool SDL_InvalidParamError([NativeTypeName("const char *")] byte* param) { - fixed (byte* fmt = "Parameter '%s' is invalid"u8) + fixed (byte* fmt = "Parameter '%s' is invalid\0"u8) return SDL_SetError(fmt, __arglist(param)); } }