Finish move to sentinal terminated slices (#203)

This commit is contained in:
Nikolas 2025-03-04 17:50:23 +01:00
parent bc82c6ebd7
commit 94fa7e23b0
No known key found for this signature in database
GPG Key ID: E95F679E3CDD9784
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ pub fn main() !void {
rl.unloadFont(font);
};
const messages = [MAX_FONTS][*:0]const u8{
const messages = [MAX_FONTS][:0]const u8{
"ALAGARD FONT designed by Hewett Tsoi",
"PIXELPLAY FONT designed by Aleksander Shevchuk",
"MECHA FONT designed by Captain Falcon",

View File

@ -2513,7 +2513,7 @@ pub fn drawTextCodepoints(font: Font, codepoints: []const c_int, position: Vecto
}
/// Load UTF-8 text encoded from codepoints array
pub fn loadUTF8(codepoints: []const c_int) [*:0]u8 {
pub fn loadUTF8(codepoints: []const c_int) [:0]u8 {
return std.mem.span(cdef.LoadUTF8(@as([*c]const c_int, @ptrCast(codepoints)), @as(c_int, @intCast(codepoints.len))));
}