diff regexParser/cerium/ppe/Print.cc @ 275:8879eb8c64a8

remove segmentation fault
author Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp>
date Sat, 30 Jan 2016 19:06:41 +0900
parents 5aa9d01926f1
children 6cc1d9779f45
line wrap: on
line diff
--- a/regexParser/cerium/ppe/Print.cc	Fri Jan 29 20:41:34 2016 +0900
+++ b/regexParser/cerium/ppe/Print.cc	Sat Jan 30 19:06:41 2016 +0900
@@ -18,10 +18,9 @@
     int out_task_num = w->task_num;
     ResultPtr prev = NULL;
     for (int i = 0; i < out_task_num ; i++) {
-        ResultPtr *idata = (ResultPtr*)w->o_data[i*3+0];
-        StatePtr blockEnd = (StatePtr)w->o_data[i*3+2];
-        StatePtr blockBegin = (StatePtr)w->o_data[i*3+4]; // next Block's blockBegin.
-        ResultPtr r = idata[i*out_size];
+        ResultPtr r = (ResultPtr)w->o_data[i*out_size+0];
+        StatePtr blockEnd = (StatePtr)w->o_data[i*out_size+2];
+        StatePtr blockBegin = (StatePtr)w->o_data[i*out_size+4]; // next Block's blockBegin.
         if (prev && i != out_task_num-1) {
             // 最後のブロックでなく、前の blockEnd が state 1 でない場合)
             if ((blockBegin->bitState.bitContainer & ~blockEnd->bitState.bitContainer)==0) {