glfw: fix for getClipboardString reaching unreachable prong on linux CI

This commit is contained in:
InKryption 2021-11-22 01:25:14 +01:00 committed by Stephen Gutekanst
parent ef7ada052c
commit 43b2502e3a

View file

@ -49,7 +49,9 @@ pub inline fn getClipboardString() Error![:0]const u8 {
internal_debug.assertInitialized();
const value = c.glfwGetClipboardString(null);
getError() catch |err| return switch (err) {
Error.PlatformError => err,
Error.PlatformError,
Error.FormatUnavailable,
=> err,
else => unreachable,
};
return std.mem.span(value);