diff --git a/core/economy.py b/core/economy.py index b71f9db..b03472b 100644 --- a/core/economy.py +++ b/core/economy.py @@ -928,7 +928,8 @@ async def do_fish_sell(user_id: int, indices: list[int] | None = None) -> dict: to_sell = inv remaining = [] else: - to_sell = [inv[i] for i in sorted(set(indices)) if 0 <= i < len(inv)] + valid_indices = [i if i >= 0 else len(inv) + i for i in indices] + to_sell = [inv[i] for i in sorted(set(valid_indices)) if 0 <= i < len(inv)] keep_idx = set(range(len(inv))) - set(indices) remaining = [inv[i] for i in sorted(keep_idx)]