From bd1aae90714f822d306fe7fbfe7562584d21a061 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 4aea066d6c..d99935daec 100644 --- a/pcbnew/legacy_plugin.h +++ b/pcbnew/legacy_plugin.h @@ -151,7 +151,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;