From: David B. <Dav...@mo...> - 2005-10-03 09:44:55
|
Tom Bergan wrote: >Hello, I believe there's a bug in dlmread - it segfaults when the file is empty. > This fix works on my machine: > >line 159: > if((long int)flen == 0) { > // file is empty > ComplexMatrix cm(0,0); > retval(0) = cm; > return retval; > } > OCTAVE_LOCAL_BUFFER(char,line,(long int)flen) > >I'm not familiar enough with the code to know if this fix is suitable, so I >haven't added this to CVS. > >-Tom Bergan > > > I think I'd be inclined to do the patch something like the attached... However, its not my code and so I'll let someone else comment before applying it.. D. -- David Bateman Dav...@mo... Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary |