Amiga: fix latent issues found in code review
- fname[18]/sprintf risks overflow for >=10 in any version field; switch to snprintf into a wider static buffer. - (1L << i) for i==31 (or shifting into the depth-loop terminator) is undefined for signed long; use 1UL. - Drop unused cnt= from amii_display_nhwindow's DoMenuScroll call; the menu return value is consumed elsewhere, not here.
This commit is contained in:
+1
-1
@@ -116,7 +116,7 @@ ReadImageFile(const char *filename, struct BitMap **bmp)
|
||||
prop = FindProp(iff, ID_BMAP, ID_CMAP);
|
||||
if (prop) {
|
||||
unsigned char *cmap = prop->sp_Data;
|
||||
for (j = 0; j < (1L << np) * 3; j += 3) {
|
||||
for (j = 0; j < (1UL << np) * 3; j += 3) {
|
||||
amii_initmap[j / 3] =
|
||||
amiv_init_map[j / 3] =
|
||||
((cmap[j+0] >> 4) << 8)
|
||||
|
||||
Reference in New Issue
Block a user