Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7.2
-
Fix Version/s: 1.7.4, 1.8-beta-1
-
Component/s: None
-
Labels:None
-
Environment:Windows 7 64 bit
-
Testcase included:yes
-
Number of attachments :
Description
I have found an issue with array incrementation, when using randomly generated number as array index.
The idea was to randomly increment one of the indexes.
For array of size = 3 and 10 incrementations I can see array was modified like this [example from system.out]:
[0, 0, 1]
[0, 0, 1]
[2, 0, 1] should be [1,0,1]
[2, 3, 1] should be [1,1,1]
[3, 3, 1] should be [2,1,1]
[3, 2, 1] now I'm puzzled as the digit is decremented!
[3, 2, 1] what was incremented? no one knows! ;]
[3, 2, 2]
[3, 2, 3]
[3, 3, 3]
See the code attached.
Additional info:
When the randomiser invocation is moved to assign value to a variable, and then variable is used as array index it works fine.
Activity
Roshan Dawrani
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Attachment | 4246_v18x.patch [ 49740 ] |
Roshan Dawrani
made changes -
| Assignee | Roshan Dawrani [ roshandawrani ] |
Roshan Dawrani
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Fix Version/s | 1.8-beta-1 [ 16013 ] | |
| Fix Version/s | 1.7.4 [ 16563 ] | |
| Resolution | Fixed [ 1 ] |
Paul King
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |