Skip to content

Commit e2f035d

Browse files
committed
Updates format strings in example for latest Zig
1 parent a7562c6 commit e2f035d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/example.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const c = @cImport({
66
pub fn main() void {
77
// Initialize SDL
88
if (!c.SDL_Init(c.SDL_INIT_VIDEO)) {
9-
std.debug.panic("{?s}", .{c.SDL_GetError()});
9+
std.debug.panic("{s}", .{c.SDL_GetError()});
1010
}
1111
defer c.SDL_Quit();
1212

@@ -46,13 +46,13 @@ pub fn main() void {
4646
const b: f32 = @floatCast(0.5 + 0.5 * @sin(now + std.math.pi * 4 / 3.0));
4747

4848
if (!c.SDL_SetRenderDrawColorFloat(renderer, r, g, b, c.SDL_ALPHA_OPAQUE_FLOAT)) {
49-
std.debug.panic("{?s}", .{c.SDL_GetError()});
49+
std.debug.panic("{s}", .{c.SDL_GetError()});
5050
}
5151
if (!c.SDL_RenderClear(renderer)) {
52-
std.debug.panic("{?s}", .{c.SDL_GetError()});
52+
std.debug.panic("{s}", .{c.SDL_GetError()});
5353
}
5454
if (!c.SDL_RenderPresent(renderer)) {
55-
std.debug.panic("{?s}", .{c.SDL_GetError()});
55+
std.debug.panic("{s}", .{c.SDL_GetError()});
5656
}
5757
}
5858
}

0 commit comments

Comments
 (0)