term: replace assert with panic to enable build-module for it too

pull/6659/head
Delyan Angelov 2020-10-21 08:49:07 +03:00
parent 61611159c7
commit f3732b730a
1 changed files with 3 additions and 1 deletions

View File

@ -50,7 +50,9 @@ pub fn get_cursor_position() Coord {
ch = C.getchar() ch = C.getchar()
b := byte(ch) b := byte(ch)
i++ i++
assert i < 15 if i >= 15 {
panic('C.getchar() called too many times')
}
// state management: // state management:
if b == `R` { if b == `R` {
break break