Eeschema: fix a bug when reading .dcm files (the eol char was not stripped, giving broken fields values)
The parser also now skip empty lines. This bug created unreadable saved .dcm files and .sch files after adding a new symbol. Fixes: lp:1786141 https://bugs.launchpad.net/kicad/+bug/1786141
This commit is contained in:
parent
42c5017db7
commit
45395f9b59
|
@ -2472,6 +2472,8 @@ void SCH_LEGACY_PLUGIN_CACHE::loadDocs()
|
|||
break;
|
||||
|
||||
text = FROM_UTF8( line + 2 );
|
||||
// Remove spaces at eol, and eol chars:
|
||||
text = text.Trim();
|
||||
|
||||
switch( line[0] )
|
||||
{
|
||||
|
@ -2490,7 +2492,11 @@ void SCH_LEGACY_PLUGIN_CACHE::loadDocs()
|
|||
alias->SetDocFileName( text );
|
||||
break;
|
||||
|
||||
case 0:
|
||||
case '\n':
|
||||
case '\r':
|
||||
case '#':
|
||||
// Empty line or commment
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue