fix: freebsd still requires 1-indexed tty (#1048)

## What are the changes about?

I thought it was working as intended but appears I just got lucky when testing.
VT_ACTIVATE still wants them 1-indexed, so increase the parsed value respectively.

My apologies!

## What existing issue(s) does this resolve?

N/A

## Pre-requisites

- [ x ] I have tested & confirmed the changes work locally
- [ x ] I have read and fully adhere to the rules set in the contributing guidelines found in `CONTRIBUTING.md`

Reviewed-on: https://codeberg.org/fairyglade/ly/pulls/1048
Reviewed-by: AnErrupTion <anerruption+codeberg@disroot.org>
This commit is contained in:
urly3 2026-08-25 11:29:52 +02:00 committed by AnErrupTion
commit 432560a1cd

View file

@ -265,7 +265,7 @@ fn PlatformStruct() type {
const dev_name = buf[0 .. len - 1];
if (std.mem.startsWith(u8, dev_name, "ttyv")) {
return try std.fmt.parseInt(u8, dev_name[dev_name.len - 1 ..], 16);
return try std.fmt.parseInt(u8, dev_name[dev_name.len - 1 ..], 16) + 1;
}
return error.NoTtyFound;