From: Lucas Bajolet Date: Fri, 21 Aug 2015 21:22:37 +0000 (-0400) Subject: lib/standard/fixed_ints: Added extra check on is_int to avoid crashing on indexed... X-Git-Tag: v0.7.8~74^2 X-Git-Url: http://nitlanguage.org lib/standard/fixed_ints: Added extra check on is_int to avoid crashing on indexed access Signed-off-by: Lucas Bajolet --- diff --git a/lib/standard/fixed_ints.nit b/lib/standard/fixed_ints.nit index 6dc6550..daad211 100644 --- 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