projects
/
movit
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
994ac0c
)
Fix a warning.
author
Steinar H. Gunderson
<sgunderson@bigfoot.com>
Mon, 1 Oct 2012 22:46:21 +0000
(
00:46
+0200)
committer
Steinar H. Gunderson
<sgunderson@bigfoot.com>
Mon, 1 Oct 2012 22:46:21 +0000
(
00:46
+0200)
main.cpp
patch
|
blob
|
history
diff --git
a/main.cpp
b/main.cpp
index
580989e
..
9a9a3ea
100644
(file)
--- a/
main.cpp
+++ b/
main.cpp
@@
-92,7
+92,7
@@
unsigned char *load_image(const char *filename, unsigned *w, unsigned *h)
SDL_LockSurface(img);
unsigned char *src_pixels = (unsigned char *)img->pixels;
unsigned char *dst_pixels = (unsigned char *)malloc(img->w * img->h * 3);
- for (
unsigned
i = 0; i < img->w * img->h; ++i) {
+ for (
int
i = 0; i < img->w * img->h; ++i) {
unsigned char r, g, b;
unsigned int temp;
unsigned int pixel = *(unsigned int *)(src_pixels + i * fmt->BytesPerPixel);