|
From: John S. <jst...@us...> - 2009-12-23 06:33:46
|
Module: performous
Branch: master
Commit: ae3c8488b6464ed17c49d6581b0747cb202aff32
Author: John Stumpo <st...@js...>
Date: Wed Dec 23 00:52:31 2009 -0500
Fix a warning in the TGA screenshot saving code.
---
game/video_driver.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/video_driver.cc b/game/video_driver.cc
index e65d1bd..d4f7b43 100644
--- a/game/video_driver.cc
+++ b/game/video_driver.cc
@@ -102,7 +102,7 @@ void Window::screenshot() {
tgaout << static_cast<char>(height >> 8);
tgaout << static_cast<char>(24); /* bits per pixel */
tgaout << static_cast<char>(0x00); /* no special flags */
- for (int i = 0; i < width*height*3; i += 3)
+ for (unsigned i = 0; i < width*height*3; i += 3)
std::swap(buffer[i], buffer[i+2]); /* fix the channel order */
tgaout.write(&buffer[0], width*height*3); /* dump the image data */
tgaout.close();
|