]> granicus.if.org Git - onig/commitdiff
remove redundant codes
authorK.Kosako <kosako@sofnec.co.jp>
Tue, 4 Jul 2017 06:21:08 +0000 (15:21 +0900)
committerK.Kosako <kosako@sofnec.co.jp>
Tue, 4 Jul 2017 06:21:08 +0000 (15:21 +0900)
src/regexec.c

index d6940a7cd789b40e0cfe5ff76c8931dae103796f..81622b5513ebe35ae82ac82c4cc6b5d067bb7fb5 100644 (file)
@@ -2231,9 +2231,6 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
         int len;
         UChar *pstart, *pend;
 
-        /* if you want to remove following line, 
-           you should check in parse and compile time. */
-        if (mem > num_mem) goto fail;
         if (mem_end_stk[mem]   == INVALID_STACK_INDEX) goto fail;
         if (mem_start_stk[mem] == INVALID_STACK_INDEX) goto fail;
 
@@ -2263,9 +2260,6 @@ match_at(regex_t* reg, const UChar* str, const UChar* end,
         int len;
         UChar *pstart, *pend;
 
-        /* if you want to remove following line, 
-           you should check in parse and compile time. */
-        if (mem > num_mem) goto fail;
         if (mem_end_stk[mem]   == INVALID_STACK_INDEX) goto fail;
         if (mem_start_stk[mem] == INVALID_STACK_INDEX) goto fail;