| ... | ... | @@ -488,7 +488,7 @@ pub fn defaultPanic( |
| 488 | 488 | |
| 489 | 489 | var utf16_buffer: [1000]u16 = undefined; |
| 490 | 490 | const len_minus_3 = std.unicode.utf8ToUtf16Le(&utf16_buffer, msg) catch 0; |
| 491 | | utf16_buffer[len_minus_3][0..3].* = .{ '\r', '\n', 0 }; |
| 491 | utf16_buffer[len_minus_3..][0..3].* = .{ '\r', '\n', 0 }; |
| 492 | 492 | const len = len_minus_3 + 3; |
| 493 | 493 | const exit_msg = utf16_buffer[0 .. len - 1 :0]; |
| 494 | 494 | |
| ... | ... | @@ -507,7 +507,7 @@ pub fn defaultPanic( |
| 507 | 507 | // ExitData buffer must be allocated using boot_services.allocatePool (spec: page 220) |
| 508 | 508 | const exit_data: []u16 = uefi.raw_pool_allocator.alloc(u16, exit_msg.len + 1) catch @trap(); |
| 509 | 509 | @memcpy(exit_data, exit_msg[0..exit_data.len]); // Includes null terminator. |
| 510 | | _ = bs.exit(uefi.handle, .Aborted, exit_msg.len + 1, exit_data); |
| 510 | _ = bs.exit(uefi.handle, .Aborted, exit_data.len, exit_data.ptr); |
| 511 | 511 | } |
| 512 | 512 | @trap(); |
| 513 | 513 | }, |