projects
/
andemo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
windows build with msvc2022
[andemo]
/
libs
/
imago
/
src
/
filetga.c
diff --git
a/libs/imago/src/filetga.c
b/libs/imago/src/filetga.c
index
d5d9fe8
..
f34c9ea
100644
(file)
--- a/
libs/imago/src/filetga.c
+++ b/
libs/imago/src/filetga.c
@@
-138,7
+138,7
@@
static int read_tga(struct img_pixmap *img, struct img_io *io)
if(hdr.cmap_type == 1) {
cmap.ncolors = hdr.cmap_len;
if(hdr.cmap_type == 1) {
cmap.ncolors = hdr.cmap_len;
- for(i=0; i<hdr.cmap_len; i++) {
+ for(i=0; i<(int)hdr.cmap_len; i++) {
switch(hdr.cmap_entry_sz) {
case 16:
c = img_read_int16_le(io);
switch(hdr.cmap_entry_sz) {
case 16:
c = img_read_int16_le(io);
@@
-190,13
+190,13
@@
static int read_tga(struct img_pixmap *img, struct img_io *io)
return -1;
}
return -1;
}
- for(i=0; i<y; i++) {
+ for(i=0; i<(int)y; i++) {
unsigned char *ptr;
int j, k;
ptr = (unsigned char*)img->pixels + ((hdr.img_desc & 0x20) ? i : y - (i + 1)) * x * pixel_bytes;
unsigned char *ptr;
int j, k;
ptr = (unsigned char*)img->pixels + ((hdr.img_desc & 0x20) ? i : y - (i + 1)) * x * pixel_bytes;
- for(j=0; j<x; j++) {
+ for(j=0; j<(int)x; j++) {
/* if the image is raw, then just read the next pixel */
if(!IS_RLE(hdr.img_type)) {
if(read_pixel(io, fmt, ptr) == -1) {
/* if the image is raw, then just read the next pixel */
if(!IS_RLE(hdr.img_type)) {
if(read_pixel(io, fmt, ptr) == -1) {