Browse Source

pnmimage: Fix bug with loaded texture quality in PNMReaderEmscripten

rdb 4 years ago
parent
commit
e3ac066a3f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/pnmimage/pnmReaderEmscripten.cxx

+ 1 - 1
panda/src/pnmimage/pnmReaderEmscripten.cxx

@@ -49,7 +49,7 @@ read_data(xel *array, xelval *alpha) {
   }
 
   int width, height;
-  char *data = emscripten_get_preloaded_image_data(_fullpath.c_str(), &width, &height);
+  unsigned char *data = (unsigned char *)emscripten_get_preloaded_image_data(_fullpath.c_str(), &width, &height);
   nassertr(data != nullptr, 0);
   nassertr(width == _x_size, 0);
   if (height > _x_size) {