Skip to content
Snippets Groups Projects
Verified Commit 926bda8c authored by Thomas Lambert's avatar Thomas Lambert :helicopter:
Browse files

fix(xf2mat): raise error when wrong input

This adds a check to raise an error when the file is completely read and
it has not be determined to be a xfoil or xflr5 result file. This
prevent an infinite loop while trying to determine the result type.
parent bd14c019
No related branches found
No related tags found
No related merge requests found
......@@ -122,6 +122,10 @@ function Polar = xf2mat(varargin)
progName = 'XFOIL';
elseif ~isempty(tmpProgname) && strcmp(tmpProgname(1:5), 'xflr5')
progName = 'XFLR5';
elseif feof(fileID)
error('MATLAB:xf2mat:WrongInputFile', ...
['The input file does not seems to be a valid XFOIL or XFLR5 results file.'...
' Are you sure you loaded RESULTS files and not coordinate points?']);
end
end
......
......@@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- **xf2mat**: add error when input is not a proper xfoil/xflr5 result
- **plotpolar**: fix issue when unavailable data
## [4.0.0] - 2022-06-09
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment