summaryrefslogtreecommitdiffstats
path: root/dis/original/Transitive
diff options
context:
space:
mode:
Diffstat (limited to 'dis/original/Transitive')
-rw-r--r--dis/original/Transitive/transitive.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/dis/original/Transitive/transitive.c b/dis/original/Transitive/transitive.c
index ca16a31..5fa52e8 100644
--- a/dis/original/Transitive/transitive.c
+++ b/dis/original/Transitive/transitive.c
@@ -11,6 +11,9 @@
11 * read the Benchmark Analysis and Specifications Document Version 1.0 11 * read the Benchmark Analysis and Specifications Document Version 1.0
12 * before going on since the detailed comments are given in this documents. 12 * before going on since the detailed comments are given in this documents.
13 * the comments are not repeated here. 13 * the comments are not repeated here.
14 *
15 * CHANGELOG:
16 * Joshua Bakita, 05/30/2020: Fixed out-of-bounds randInt call
14 */ 17 */
15 18
16#include <stdio.h> 19#include <stdio.h>
@@ -64,8 +67,8 @@ int main(int argc, char** argv){
64 67
65 randInit(seed); 68 randInit(seed);
66 for (k=0; k<m; k++){ 69 for (k=0; k<m; k++){
67 i = randInt(0, n); 70 i = randInt(0, n-1);
68 j = randInt(0, n); 71 j = randInt(0, n-1);
69 *(din + j*n + i) = randInt(MIN_EDGES, MAX_EDGES); 72 *(din + j*n + i) = randInt(MIN_EDGES, MAX_EDGES);
70 } 73 }
71 74