A patch for test:

>From ff128dbcd1122351484b5e7f715c9c308fa24a3b Mon Sep 17 00:00:00 2001
From: Dewey Garrett <[email protected]>
Date: Wed, 1 Aug 2012 16:53:50 -0700
Subject: [PATCH] tool_parse.cc: handle erroneous tool tbl lines

require a toolno for line to be valid
Bugs item #3553265
---
 src/emc/rs274ngc/tool_parse.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/emc/rs274ngc/tool_parse.cc b/src/emc/rs274ngc/tool_parse.cc
index cad4b13..708fd24 100644
--- a/src/emc/rs274ngc/tool_parse.cc
+++ b/src/emc/rs274ngc/tool_parse.cc
@@ -247,7 +247,7 @@ int loadToolTable(const char *filename,
             }
             token = strtok(NULL, " ");
         }
-        if (valid) {
+        if (valid && (toolno != -1) ) {
             toolTable[pocket].toolno = toolno;
             toolTable[pocket].offset = offset;
             toolTable[pocket].diameter = diameter;
-- 
1.7.0.4

-- 
Dewey Garrett


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to