From 583d8a32a267604f0c5916ce01bed307fef5b59c Mon Sep 17 00:00:00 2001 From: Winfried Ritsch Date: Wed, 30 Sep 2009 10:09:29 +0000 Subject: reading with fread error was not handled properly svn path=/trunk/externals/iemlib/; revision=12497 --- iemlib2/src/iem_pbank_csv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'iemlib2') diff --git a/iemlib2/src/iem_pbank_csv.c b/iemlib2/src/iem_pbank_csv.c index d67f365..213e63c 100644 --- a/iemlib2/src/iem_pbank_csv.c +++ b/iemlib2/src/iem_pbank_csv.c @@ -431,7 +431,8 @@ static void iem_pbank_csv_read(t_iem_pbank_csv *x, t_symbol *filename, t_symbol fseek(fh,0,SEEK_SET); txbuf1 = (char *)getbytes(2 * txalloc * sizeof(char)); txbuf2 = (char *)getbytes(2 * txalloc * sizeof(char)); - fread(txbuf1, sizeof(char), txalloc, fh); + if(fread(txbuf1, sizeof(char), txalloc, fh) < sizeof(char)*txalloc) + post("pbank.csv:435: warning read error (not specified)"); fclose(fh); // windows return -- cgit v1.2.1