--- a/src/raytracermodule.cc Fri Apr 04 13:54:47 2008 +0200
+++ b/src/raytracermodule.cc Tue Apr 08 01:05:12 2008 +0200
@@ -736,7 +736,7 @@
static PyObject* Raytracer_render(PyObject* self, PyObject* args)
{
int w = 0, h = 0;
- char *chardata;
+ unsigned char *chardata;
Float *data;
PyObject *o;
@@ -756,9 +756,9 @@
// convert data to char
printf("[pyrit] Converting image data (float to char)\n");
- chardata = (char *) malloc(w*h*3);
+ chardata = (unsigned char *) malloc(w*h*3);
Float *d = data;
- for (char *c = chardata; c != chardata + w*h*3; c++, d++) {
+ for (unsigned char *c = chardata; c != chardata + w*h*3; c++, d++) {
if (*d > 1.0)
*c = 255;
else