From bc8739f930a845b24ef7529f83ec1cf4c7ca1483 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 9 Dec 2018 17:59:00 +0100 Subject: [PATCH] Eeschema: fix incorrect parsing of line color (r v b values). Only the R and V were read, the parsing was stopping before reading the B value. --- eeschema/sch_legacy_plugin.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/eeschema/sch_legacy_plugin.cpp b/eeschema/sch_legacy_plugin.cpp index 98dd7211c5..ee7c9dccc5 100644 --- a/eeschema/sch_legacy_plugin.cpp +++ b/eeschema/sch_legacy_plugin.cpp @@ -1238,8 +1238,14 @@ SCH_LINE* SCH_LEGACY_PLUGIN::loadWire( FILE_LINE_READER& aReader ) color[3] = 255; for(; ii < prm_count && !is_eol( *line ); ii++ ) + { color[ii] = parseInt( aReader, line, &line ); + // Skip the separator between values + if( *line == ',' || *line == ' ') + line++; + } + wire->SetLineColor( color[0]/255.0, color[1]/255.0, color[2]/255.0,color[3]/255.0 ); } }