niti: Fixed method NativeString::copy_to in intern_call
authorLucas Bajolet <r4pass@hotmail.com>
Thu, 5 Feb 2015 15:53:02 +0000 (10:53 -0500)
committerLucas Bajolet <r4pass@hotmail.com>
Thu, 5 Feb 2015 16:08:57 +0000 (11:08 -0500)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

src/interpreter/naive_interpreter.nit

index aa95eb4..bb0b3b3 100644 (file)
@@ -970,13 +970,13 @@ redef class AMethPropdef
                                if fromval < 0 then
                                        debug("Illegal access on {recvval} for element {fromval}/{recvval.length}")
                                end
-                               if fromval + lenval >= recvval.length then
+                               if fromval + lenval > recvval.length then
                                        debug("Illegal access on {recvval} for element {fromval}+{lenval}/{recvval.length}")
                                end
                                if toval < 0 then
                                        debug("Illegal access on {destval} for element {toval}/{destval.length}")
                                end
-                               if toval + lenval >= destval.length then
+                               if toval + lenval > destval.length then
                                        debug("Illegal access on {destval} for element {toval}+{lenval}/{destval.length}")
                                end
                                recvval.as(FlatBuffer).copy(fromval, lenval, destval, toval)