mirror of
https://github.com/matrix-org/dendrite
synced 2024-11-04 06:59:01 +01:00
Prevent index out of bounds error (#503)
This commit is contained in:
parent
93b7b18646
commit
06338b06d7
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ func (s *eventStateKeyStatements) bulkSelectEventStateKeyNID(
|
||||||
func (s *eventStateKeyStatements) bulkSelectEventStateKey(
|
func (s *eventStateKeyStatements) bulkSelectEventStateKey(
|
||||||
ctx context.Context, eventStateKeyNIDs []types.EventStateKeyNID,
|
ctx context.Context, eventStateKeyNIDs []types.EventStateKeyNID,
|
||||||
) (map[types.EventStateKeyNID]string, error) {
|
) (map[types.EventStateKeyNID]string, error) {
|
||||||
var nIDs pq.Int64Array
|
nIDs := make(pq.Int64Array, len(eventStateKeyNIDs))
|
||||||
for i := range eventStateKeyNIDs {
|
for i := range eventStateKeyNIDs {
|
||||||
nIDs[i] = int64(eventStateKeyNIDs[i])
|
nIDs[i] = int64(eventStateKeyNIDs[i])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue