Does it work instead to do:

```
const u32 clutBase = (gstate.clutformat & 0x1f0000) >> 12; 
const u32 totalBytes = clutTotalBytes_ + clutBase;
```

And then just replace all the `clutTotalBytes` usage inside this function with `totalBytes`?  I'm not really sure how that could work, but that sounds like what you're doing.

But, it would seem like LoadClut() doesn't load enough bytes in that case.  I mean, think of it this way:

LoadClut has a contract that it populates `clutBufRaw_[0 .. clutTotalBytes_]` (looking at it in bytes.)  That means anything > `clutTotalBytes_` is out of bounds.

With your changes:
```
void *srcPtr = (u16 *)clutBufRaw_ + clutBase; 
int numPixels = clutTotalBytes_ / sizeof(u16); 
ConvertColors(dstPtr, srcPtr, getClutDestFormat(clutFormat), numPixels); 
```

You are reading from (again looking at it as bytes) `clutBufRaw_[N .. N + clutTotalBytes_]`.  If N is greater than 0, you are reading uninitialized RAM, am I wrong?  It's outside the bounds of what was read.

I think this means one of:
 * The solution here is that you're no longer running `ConvertColors()` on a portion of the palette that is being used.  This means either it's being double-applied or applied incorrectly.
 * The uninitialized bytes happen to have useful data in them from a previous clut load, but we shouldn't be reading them.
 * ClutLoad() should be reading more bytes, or even a constant number of bytes to ensure these bytes are all initialized.

I don't think the right solution is to read uninitialized memory.

-[Unknown]