ghaerr / elks

Embeddable Linux Kernel Subset - Linux for 8086
Other
1.02k stars 108 forks source link

[cmds] Fix off-by-one bug in getty @T command #2021

Closed vkoskiv closed 2 months ago

vkoskiv commented 2 months ago

The @T command, when placed in /etc/issue, displays the current system time. The shuffling of the date string in when() had an off-by-one error, which meant that instead of showing 17:42:00, it showed 77:42:00

ghaerr commented 2 months ago

Nice catch, and I have been wondering when someone might actually use some of the @ variables in /etc/issue!