mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-28 06:21:25 +00:00
Fix crash when remap on palettes with more than 256 colors
This commit is contained in:
parent
4c1a13bf07
commit
b1203216be
@ -1,6 +1,6 @@
|
||||
// Aseprite Document Library
|
||||
// Copyright (c) 2020 Igara Studio S.A.
|
||||
// Copyright (c) 2001-2016 David Capello
|
||||
// Copyright (C) 2019-2021 Igara Studio S.A.
|
||||
// Copyright (C) 2001-2016 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -157,7 +157,8 @@ bool Remap::isFor8bit() const
|
||||
bool Remap::isInvertible(const PalettePicks& usedEntries) const
|
||||
{
|
||||
PalettePicks picks(size());
|
||||
for (int i=0; i<size(); ++i) {
|
||||
const int n = std::min(size(), usedEntries.size());
|
||||
for (int i=0; i<n; ++i) {
|
||||
if (!usedEntries[i])
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user