os-crystal
os-crystal copied to clipboard
OutputConsole#put_byte should check for going past border of @framebuffer
This method checks for @col >= 80 in one place, but checks @col == 80 in another. Maybe they should both check '>='.
Also, there are no checks for @row going past the border [or wrapping around].
You should put anything using the at symbol inside backticks (`@foo`), since you ended up pinging two users named row and col.
😎
oops, sorry
It mostly prints one character at a time, so checking just for @col == 80 is fine there. The only situation where this isn't true if when printing a tab \t. Here the cursor can go beyond 80 and the check needs to be >=. Having both be >= is no harm, but there is no need.
@row needs to be checked, and cause a scroll.