diff --git a/pcbnew/ioascii.cpp b/pcbnew/ioascii.cpp index 23bd82bc8c..a02e17e59b 100644 --- a/pcbnew/ioascii.cpp +++ b/pcbnew/ioascii.cpp @@ -896,8 +896,8 @@ static bool ReadSheetDescr( BOARD* aBoard, BASE_SCREEN* screen, LINE_READER* aRe // only parse the width and height if page size is "User" if( wname == wxT( "User" ) ) { - char* width = strtok( line, delims ); - char* height = strtok( line, delims ); + char* width = strtok( NULL, delims ); + char* height = strtok( NULL, delims ); if( width && height ) { diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index e1fa522288..0b3a95914e 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -466,8 +466,8 @@ void KICAD_PLUGIN::loadSHEET() // only parse the width and height if page size is "User" if( wname == wxT( "User" ) ) { - char* width = strtok( line, delims ); - char* height = strtok( line, delims ); + char* width = strtok( NULL, delims ); + char* height = strtok( NULL, delims ); if( width && height ) {