mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-19 19:14:42 +00:00
improved robustness of parsing of incomplete ALN files
This commit is contained in:
parent
0519dad08c
commit
afcf3dbfca
@ -94,12 +94,13 @@ public:
|
||||
rm.filename = buffer;
|
||||
|
||||
fgets(buffer, 1024, stream);
|
||||
*strchr(buffer,'\n')=0;
|
||||
if(strchr(buffer,'\r')) *strchr(buffer,'\r')=0;
|
||||
|
||||
if(buffer[0]!='#')
|
||||
return ExpectingComment;
|
||||
|
||||
*strchr(buffer,'\n')=0;
|
||||
if(strchr(buffer,'\r')) *strchr(buffer,'\r')=0;
|
||||
|
||||
|
||||
char *occurrence = strchr(buffer, 'W');
|
||||
if(occurrence!=NULL && occurrence[1]==':')
|
||||
rm.quality = (float) atof(occurrence+2);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user