aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--broccoli/src/pasad.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/broccoli/src/pasad.c b/broccoli/src/pasad.c
index 91b422c..1bb0e26 100644
--- a/broccoli/src/pasad.c
+++ b/broccoli/src/pasad.c
@@ -49,6 +49,10 @@ int main()
char ch='a';
int flag=0;
file=fopen("U.txt", "r");
+ if (!file) {
+ fprintf(stderr, "Could not open U.txt. Aborting.\n");
+ return 1;
+ }
printf(" >Reading U[%dx%d] matrix from .txt file...",L,r);
/* Read all values to an array */
for(i=0;i<L;i++)