Fix crash in dynos texture generation
This commit is contained in:
parent
b0094f7ce4
commit
7450b84694
|
@ -110,6 +110,7 @@ static u8 *IA16_RGBA32(const u8 *aData, u64 aLength) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 *CI4_RGBA32(const u8 *aData, u64 aLength, const u8 *aPalette) {
|
static u8 *CI4_RGBA32(const u8 *aData, u64 aLength, const u8 *aPalette) {
|
||||||
|
if (!aPalette) { return NULL; }
|
||||||
u8 *_Buffer = New<u8>(aLength * 8);
|
u8 *_Buffer = New<u8>(aLength * 8);
|
||||||
u8 *pBuffer = _Buffer;
|
u8 *pBuffer = _Buffer;
|
||||||
for (u64 i = 0; i != aLength; ++i) {
|
for (u64 i = 0; i != aLength; ++i) {
|
||||||
|
@ -139,6 +140,7 @@ static u8 *CI4_RGBA32(const u8 *aData, u64 aLength, const u8 *aPalette) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 *CI8_RGBA32(const u8 *aData, u64 aLength, const u8 *aPalette) {
|
static u8 *CI8_RGBA32(const u8 *aData, u64 aLength, const u8 *aPalette) {
|
||||||
|
if (!aPalette) { return NULL; }
|
||||||
u8 *_Buffer = New<u8>(aLength * 4);
|
u8 *_Buffer = New<u8>(aLength * 4);
|
||||||
u8 *pBuffer = _Buffer;
|
u8 *pBuffer = _Buffer;
|
||||||
for (u64 i = 0; i != aLength; ++i) {
|
for (u64 i = 0; i != aLength; ++i) {
|
||||||
|
|
Loading…
Reference in New Issue