瀏覽代碼

pnmimage: Fix bug with loaded texture quality in PNMReaderEmscripten

rdb 4 年之前
父節點
當前提交
e3ac066a3f
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;
   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(data != nullptr, 0);
   nassertr(width == _x_size, 0);
   nassertr(width == _x_size, 0);
   if (height > _x_size) {
   if (height > _x_size) {