From 4e5f11c646f84300bd77186e99e582b87af50a1b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 11 Oct 2016 16:00:43 +0200 Subject: [PATCH] Fixed a crash when a negative (although invalid) net code occurs in legacy plugin --- pcbnew/legacy_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/legacy_plugin.h b/pcbnew/legacy_plugin.h index 1e0ebd315d..3aae932510 100644 --- a/pcbnew/legacy_plugin.h +++ b/pcbnew/legacy_plugin.h @@ -143,7 +143,7 @@ protected: ///> otherwise returns unchanged net code inline int getNetCode( int aNetCode ) { - if( aNetCode < (int) m_netCodes.size() ) + if( (unsigned int) aNetCode < m_netCodes.size() ) return m_netCodes[aNetCode]; return aNetCode;