empty match interception with null return
This commit is contained in:
parent
5a51b75411
commit
e3b87326d2
|
|
@ -88,6 +88,12 @@ export class Searcher {
|
|||
}
|
||||
}
|
||||
|
||||
// empty match interception.
|
||||
// and this could be a case.
|
||||
if (dPtr == -1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// console.log(`dLen: ${dLen}, dPtr: ${dPtr}`);
|
||||
const region = Buffer.alloc(dLen);
|
||||
this.read(dPtr, region);
|
||||
|
|
|
|||
Loading…
Reference in New Issue