diff --git a/polymer/eduke32/build/include/build.h b/polymer/eduke32/build/include/build.h index f658ba3fa..06fc52ae1 100644 --- a/polymer/eduke32/build/include/build.h +++ b/polymer/eduke32/build/include/build.h @@ -561,7 +561,7 @@ void loadtile(int16_t tilenume); int32_t qloadkvx(int32_t voxindex, const char *filename); int32_t allocatepermanenttile(int16_t tilenume, int32_t xsiz, int32_t ysiz); //void copytilepiece(int32_t tilenume1, int32_t sx1, int32_t sy1, int32_t xsiz, int32_t ysiz, int32_t tilenume2, int32_t sx2, int32_t sy2); -void makepalookup(int32_t palnum, char *remapbuf, int8_t r, int8_t g, int8_t b, char dastat); +void makepalookup(int32_t palnum, const char *remapbuf, int8_t r, int8_t g, int8_t b, char dastat); //void setvgapalette(void); void setbasepaltable(uint8_t **basepaltable, uint8_t basepalcount); void setbrightness(char dabrightness, uint8_t dapalid, uint8_t flags); diff --git a/polymer/eduke32/build/src/defs.c b/polymer/eduke32/build/src/defs.c index 194fded0d..11f3caf7d 100644 --- a/polymer/eduke32/build/src/defs.c +++ b/polymer/eduke32/build/src/defs.c @@ -380,7 +380,7 @@ static int32_t defsparser(scriptfile *script) if (scriptfile_getnumber(script,&g)) break; if (scriptfile_getnumber(script,&b)) break; - if (col < 256) + if ((unsigned)col < 256) { vgapal16[col*4+0] = b; // blue vgapal16[col*4+1] = g; // green diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 3916e7dcb..26e6f51b7 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -13519,13 +13519,16 @@ void rotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum, // // makepalookup // -void makepalookup(int32_t palnum, char *remapbuf, int8_t r, int8_t g, int8_t b, char dastat) +void makepalookup(int32_t palnum, const char *remapbuf, int8_t r, int8_t g, int8_t b, char dastat) { int32_t i, j, palscale; char *ptr, *ptr2; if (paletteloaded == 0) return; + if ((unsigned)palnum >= MAXPALOOKUPS) + return; + if (palookup[palnum] == NULL) { //Allocate palookup buffer