nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
lib/standard/fixed_ints: Added extra check on is_int to avoid crashing on indexed...
[nit.git]
/
lib
/
standard
/
fixed_ints.nit
diff --git
a/lib/standard/fixed_ints.nit
b/lib/standard/fixed_ints.nit
index
6dc6550
..
daad211
100644
(file)
--- a/
lib/standard/fixed_ints.nit
+++ b/
lib/standard/fixed_ints.nit
@@
-883,7
+883,9
@@
redef class Text
# assert "0b1011".is_int
# assert not "0x_".is_int
# assert not "0xGE".is_int
+ # assert not "".is_int
fun is_int: Bool do
+ if bytelen == 0 then return false
var s = remove_all('_')
var pos = 0
while s[pos] == '-' do