Closed kevr closed 3 months ago
Hey there! Would you kindly update ths PR for the Zig rewrite please? Don't worry, it's not hard: in fact, you only have to do that change for the TTY ID now, because it assumes the ID is <=99, even though it's a byte. However, you don't have to worry about the null terminator, because that's handled by the Zig functions:
https://github.com/fairyglade/ly/blob/0586f3424a0e90477fbfa1d0372ded7ee2c0ed0a/src/auth.zig#L24-L25
I've gone ahead and implemented the changes left in master, closing.
Hi fairyglade.
This patchset simply allows for the worst-case scenario when snprintfing to buffers, which also removes a warning during compilation.
C strings use a null terminating character,
'\0
, to mark the end of a string for functions that support string inputs without a given size. So, they are always 1 byte bigger than the string that they hold.