mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
term: replace assert with panic to enable build-module for it too
This commit is contained in:
parent
61611159c7
commit
f3732b730a
@ -50,7 +50,9 @@ pub fn get_cursor_position() Coord {
|
||||
ch = C.getchar()
|
||||
b := byte(ch)
|
||||
i++
|
||||
assert i < 15
|
||||
if i >= 15 {
|
||||
panic('C.getchar() called too many times')
|
||||
}
|
||||
// state management:
|
||||
if b == `R` {
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user