[m-rev.] diff: fix off-by-one error in array.unsafe_set (erlang)
Peter Wang
wangp at students.csse.unimelb.edu.au
Tue Jun 12 17:19:23 AEST 2007
Estimated hours taken: 0.1
Branches: main
library/array.m:
Fix off-by-one error in Erlang implementation of array.unsafe_set.
Index: array.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/library/array.m,v
retrieving revision 1.155
diff -u -r1.155 array.m
--- array.m 7 Jun 2007 07:53:05 -0000 1.155
+++ array.m 12 Jun 2007 07:17:47 -0000
@@ -879,7 +879,7 @@
array.unsafe_set(Array0::array_di, Index::in, Item::in, Array::array_uo),
[will_not_call_mercury, promise_pure, thread_safe],
"
- Array = setelement(Index, Array0, Item)
+ Array = setelement(Index + 1, Array0, Item)
").
:- pragma foreign_proc("Java",
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list