summaryrefslogtreecommitdiff
path: root/colm/pdarun.c
diff options
context:
space:
mode:
Diffstat (limited to 'colm/pdarun.c')
-rw-r--r--colm/pdarun.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/colm/pdarun.c b/colm/pdarun.c
index a334f358..f762689d 100644
--- a/colm/pdarun.c
+++ b/colm/pdarun.c
@@ -817,7 +817,14 @@ Head *extractMatch( Program *prg, FsmRun *fsmRun, StreamImpl *is )
fsmRun->consumeBuf = runBuf;
int lenCopied = 0;
+ int total = 0;
is->funcs->getData( fsmRun, is, 0, runBuf->data, length, &lenCopied );
+ total += lenCopied;
+ while ( total < length ) {
+ is->funcs->getData( fsmRun, is, total, runBuf->data+total, length-total, &lenCopied );
+ total += lenCopied;
+ }
+
is->funcs->consumeData( is, length );
fsmRun->p = fsmRun->pe = fsmRun->scanBuf->data;