Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crashes in tests #551

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tests/unit/test_composites.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*/

#define NC 4
#define NT 11
#define NT 12

// fixed label array
static elabel_t label[NT];
Expand All @@ -59,6 +59,7 @@ static eterm_t g = 7;
static eterm_t h = 8;
static eterm_t i = 9;
static eterm_t j = 10;
static eterm_t k = 11;


#define NCMP 50
Expand Down Expand Up @@ -88,6 +89,8 @@ static void init_labels(void) {
label[h] = pos_label(3);
label[i] = pos_label(3);
label[j] = pos_label(3);

label[k] = pos_label(4);
};

/*
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_concrete_values3.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static void init_buffer1(void) {
for (i=0; i<BUFFER_SIZE; i++) {
buffer1[i] = val[j];
j ++;
if (j > NVALS) j = 0;
if (j >= NVALS) j = 0;
}
}

Expand Down
Loading