VRML plugin: VRML plugin. This patch modifies the behavior of the VRML name parser so that a name may be immediately succeeded by ] or }.

The previous behavior was to reject a valid name since the brace or bracket was considered an invalid character within a name.
This commit is contained in:
Cirilo Bernardo 2016-05-16 09:32:15 +02:00 committed by jean-pierre charras
parent 00b8624713
commit 0ec15c9157
3 changed files with 3 additions and 2 deletions

View File

@ -46,7 +46,7 @@
#define PLUGIN_VRML_MAJOR 1
#define PLUGIN_VRML_MINOR 3
#define PLUGIN_VRML_PATCH 2
#define PLUGIN_VRML_REVNO 0
#define PLUGIN_VRML_REVNO 1
const char* GetKicadPluginName( void )

View File

@ -304,6 +304,7 @@ bool WRLPROC::ReadName( std::string& aName )
while( m_bufpos < ssize && m_buf[m_bufpos] > 0x20 )
{
if( '[' == m_buf[m_bufpos] || '{' == m_buf[m_bufpos]
|| ']' == m_buf[m_bufpos] || '}' == m_buf[m_bufpos]
|| '.' == m_buf[m_bufpos] || '#' == m_buf[m_bufpos]
|| ',' == m_buf[m_bufpos] )
{

View File

@ -87,7 +87,7 @@ public:
bool ReadGlob( std::string& aGlob );
// read a VRML name; is similar to ReadGlob except that it enforces
// name checking rules, does not allow a comma at the end, and
// stops when a left brace or bracket is found.
// stops when a left/right brace or bracket is found.
bool ReadName( std::string& aName );
bool DiscardNode( void ); // discard node data in a matched '{}' set
bool DiscardList( void ); // discard list data in a matched '[]' set