diff --git a/pcbnew/dsn.cpp b/pcbnew/dsn.cpp index 7949b56150..d511ced7e2 100644 --- a/pcbnew/dsn.cpp +++ b/pcbnew/dsn.cpp @@ -1096,6 +1096,13 @@ L_read: curText += *cur; head = cur+1; + + if( head= limit ) { wxString errtxt(_("Un-terminated delimited string") ); - ThrowIOError( errtxt, limit-start+1 ); + ThrowIOError( errtxt, cur-start+1 ); } curText.clear();