parent
588bc7b7f9
commit
de5c62a901
|
|
@ -26,7 +26,7 @@ main(int argc, char **argv)
|
||||||
double x, *table;
|
double x, *table;
|
||||||
int i, n;
|
int i, n;
|
||||||
|
|
||||||
table = calloc(sizeof(double), TABLESIZE);
|
table = calloc(sizeof(double), TABLESIZE+1);
|
||||||
if (!table) {
|
if (!table) {
|
||||||
fprintf(stderr, "Not enough memory\n");
|
fprintf(stderr, "Not enough memory\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ main(int argc, char **argv)
|
||||||
double *table;
|
double *table;
|
||||||
int i,n;
|
int i,n;
|
||||||
|
|
||||||
table = calloc(TABLESIZE, sizeof(double));
|
table = calloc(TABLESIZE+1, sizeof(double));
|
||||||
if (!table) {
|
if (!table) {
|
||||||
fprintf(stderr, "Out of memory!\n");
|
fprintf(stderr, "Out of memory!\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue