fix bug in symbol_c::find_element()
authorMario de Sousa <msousa@fe.up.pt>
Tue, 04 Apr 2017 17:21:42 +0100
changeset 1046 292b7dcf14f6
parent 1045 428e0748b5cd
child 1047 34b733cb6641
fix bug in symbol_c::find_element()
absyntax/absyntax.cc
--- a/absyntax/absyntax.cc	Tue Apr 04 15:28:49 2017 +0100
+++ b/absyntax/absyntax.cc	Tue Apr 04 17:21:42 2017 +0100
@@ -122,8 +122,9 @@
   // method of string comparison throughout matiec
   nocasecmp_c ncc; 
   for (int i = 0; i < n; i++) 
-    if (ncc(elements[i].token_value, token_value))
+    if (!ncc(elements[i].token_value, token_value))
       return elements[i].symbol;
+
   return NULL; // not found
 }