mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
mmbBuildInitRangePlan: correct offset if initial block is not block 0
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015-2016, Intel Corporation
|
||||
* Copyright (c) 2015-2017, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -272,7 +272,7 @@ void mmbBuildInitRangePlan(u32 total_bits, u32 begin, u32 end,
|
||||
}
|
||||
|
||||
// Partial block to deal with beginning.
|
||||
block_offset += k1 / MMB_KEY_BITS;
|
||||
block_offset += (k1 / MMB_KEY_BITS) * sizeof(MMB_TYPE);
|
||||
if (k1 % MMB_KEY_BITS) {
|
||||
u32 idx = k1 / MMB_KEY_BITS;
|
||||
u32 block_end = (idx + 1) * MMB_KEY_BITS;
|
||||
|
Reference in New Issue
Block a user