glfw: fix panic when pressing enter on Apple SDK license prompt (fixes #22)
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
7ca9b85d43
commit
c3bdb99a14
3 changed files with 2720 additions and 1 deletions
|
@ -320,7 +320,7 @@ fn confirmAppleSDKAgreement(allocator: *std.mem.Allocator) !bool {
|
|||
if (try stdin.readUntilDelimiterOrEof(buf[0..], '\n')) |user_input| {
|
||||
try stdout.print("\n", .{});
|
||||
var in = user_input;
|
||||
if (in[in.len - 1] == '\r') in = in[0 .. in.len - 1];
|
||||
if (in.len > 0 and in[in.len - 1] == '\r') in = in[0 .. in.len - 1];
|
||||
return std.mem.eql(u8, in, "y") or std.mem.eql(u8, in, "Y") or std.mem.eql(u8, in, "yes") or std.mem.eql(u8, in, "");
|
||||
} else {
|
||||
return false;
|
||||
|
|
BIN
glfw/libglfw3.a
Normal file
BIN
glfw/libglfw3.a
Normal file
Binary file not shown.
2719
glfw/src/TODO
Normal file
2719
glfw/src/TODO
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue