*/\r
JNIEXPORT jobject JNICALL Java_com_badlogic_gdx_graphics_Gdx2DPixmap_load\r
(JNIEnv *env, jclass, jlongArray nativeData, jbyteArray buffer, jint len, jint req_format) {\r
- char* p_buffer = (char*)env->GetPrimitiveArrayCritical(buffer, 0);\r
+ const unsigned char* p_buffer = (const char*)env->GetPrimitiveArrayCritical(buffer, 0);\r
gdx2d_pixmap* pixmap = gdx2d_load(p_buffer, len, req_format);\r
- env->ReleasePrimitiveArrayCritical(buffer, p_buffer, 0);\r
+ env->ReleasePrimitiveArrayCritical(buffer, (char*)p_buffer, 0);\r
\r
if(pixmap==0)\r
return 0;\r