nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bf79dc
)
lib/standard/fixed_ints: Added extra check on is_int to avoid crashing on indexed...
author
Lucas Bajolet
<r4pass@hotmail.com>
Fri, 21 Aug 2015 21:22:37 +0000
(17:22 -0400)
committer
Lucas Bajolet
<r4pass@hotmail.com>
Fri, 21 Aug 2015 21:22:37 +0000
(17:22 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>
lib/standard/fixed_ints.nit
patch
|
blob
|
history
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