mirror of https://github.com/ppy/SDL3-CS.git
Ensure that format strings are null-terminated
u8 constants are implicitly null-terminated, but it's not really documented.
This commit is contained in:
parent
40707381f6
commit
2b556b39ce
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue