mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-16 04:13:50 +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
|
// Aseprite Document Library
|
||||||
// Copyright (c) 2020 Igara Studio S.A.
|
// Copyright (C) 2019-2021 Igara Studio S.A.
|
||||||
// Copyright (c) 2001-2016 David Capello
|
// Copyright (C) 2001-2016 David Capello
|
||||||
//
|
//
|
||||||
// This file is released under the terms of the MIT license.
|
// This file is released under the terms of the MIT license.
|
||||||
// Read LICENSE.txt for more information.
|
// Read LICENSE.txt for more information.
|
||||||
@ -157,7 +157,8 @@ bool Remap::isFor8bit() const
|
|||||||
bool Remap::isInvertible(const PalettePicks& usedEntries) const
|
bool Remap::isInvertible(const PalettePicks& usedEntries) const
|
||||||
{
|
{
|
||||||
PalettePicks picks(size());
|
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])
|
if (!usedEntries[i])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user