Fixed multiplier for position of "label" in case of "po" key entry

in "po", the ordering is {"predicate","object","subject","label"} thus the offset of label is 3*hashSize+2
This commit is contained in:
Igor Mihalik 2015-07-28 14:09:23 +02:00
parent 250ad9669d
commit a8c885a5e8

View file

@ -199,7 +199,7 @@ func PositionOf(prefix []byte, d quad.Direction, qs *QuadStore) int {
case quad.Object:
return hashSize + 2
case quad.Label:
return hashSize + 2
return 3*hashSize + 2
}
}
if bytes.Equal(prefix, []byte("os")) {