mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 21:47:59 +01:00
offset negative index by 1
This commit is contained in:
parent
eb80be2a5b
commit
cf80b6a63b
2 changed files with 2 additions and 2 deletions
|
@ -101,7 +101,7 @@ export class LocalAutocompleter {
|
||||||
|
|
||||||
if (imageCount < 0) {
|
if (imageCount < 0) {
|
||||||
// This is actually an alias, so follow it
|
// This is actually an alias, so follow it
|
||||||
return [ name, this.getResultAt(-imageCount)[1] ];
|
return [ name, this.getResultAt(-imageCount - 1)[1] ];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [ name, { name, imageCount, associations } ];
|
return [ name, { name, imageCount, associations } ];
|
||||||
|
|
|
@ -75,7 +75,7 @@ defmodule Philomena.Autocomplete do
|
||||||
if not is_nil(alias_target) do
|
if not is_nil(alias_target) do
|
||||||
target = Map.fetch!(reference_indexes, alias_target)
|
target = Map.fetch!(reference_indexes, alias_target)
|
||||||
|
|
||||||
<<references::binary, pos::32-little, -target::32-little>>
|
<<references::binary, pos::32-little, -(target + 1)::32-little>>
|
||||||
else
|
else
|
||||||
<<references::binary, pos::32-little, images_count::32-little>>
|
<<references::binary, pos::32-little, images_count::32-little>>
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue