]> granicus.if.org Git - onig/commitdiff
fix #60 : invalid state(CCS_VALUE) in parse_char_class()
authorK.Kosako <kosako@sofnec.co.jp>
Wed, 24 May 2017 04:43:25 +0000 (13:43 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Wed, 24 May 2017 04:43:25 +0000 (13:43 +0900)
src/regparse.c

index 69875fa8015edbcd21e17ec5a2961c82a2f7eef6..198874769206616786a063b13ad9ce1d2b7513a2 100644 (file)
@@ -4081,7 +4081,9 @@ next_state_class(CClassNode* cc, OnigCodePoint* vs, enum CCVALTYPE* type,
     }
   }
 
-  *state = CCS_VALUE;
+  if (*state != CCS_START)
+    *state = CCS_VALUE;
+
   *type  = CCV_CLASS;
   return 0;
 }