fix search() elseif

This commit is contained in:
lei.tian 2022-06-30 19:43:56 +08:00
parent 7612e59449
commit 9ab6658e7d

View File

@ -122,8 +122,7 @@ class XdbSearcher
if ($this->vectorIndex != null) { if ($this->vectorIndex != null) {
$sPtr = self::getLong($this->vectorIndex, $idx); $sPtr = self::getLong($this->vectorIndex, $idx);
$ePtr = self::getLong($this->vectorIndex, $idx + 4); $ePtr = self::getLong($this->vectorIndex, $idx + 4);
} else { } elseif ($this->contentBuff != null) {
if ($this->contentBuff != null) {
$sPtr = self::getLong($this->contentBuff, self::HeaderInfoLength + $idx); $sPtr = self::getLong($this->contentBuff, self::HeaderInfoLength + $idx);
$ePtr = self::getLong($this->contentBuff, self::HeaderInfoLength + $idx + 4); $ePtr = self::getLong($this->contentBuff, self::HeaderInfoLength + $idx + 4);
} else { } else {
@ -136,7 +135,6 @@ class XdbSearcher
$sPtr = self::getLong($buff, 0); $sPtr = self::getLong($buff, 0);
$ePtr = self::getLong($buff, 4); $ePtr = self::getLong($buff, 4);
} }
}
// printf("sPtr: %d, ePtr: %d\n", $sPtr, $ePtr); // printf("sPtr: %d, ePtr: %d\n", $sPtr, $ePtr);