summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Scott <stuartscott@google.com>2014-05-02 23:13:53 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-05-02 23:13:53 +0000
commit295b205197c74308ddfc928c3b90124ed42e25bf (patch)
tree25d060be7aa9236629381d1eb2b03e7a35e8ac2b
parent534eda42398fcc892f13c0e6c89e9a391c43e561 (diff)
parent5e93c0c67afe7e29aa0f1979b1be6b9cb0fe9a07 (diff)
downloadcts-idea133-weekly-release.tar.gz
Merge "libctsopengl_jni: Change char* to unsigned char*"idea133-weekly-release
-rw-r--r--suite/cts/deviceTests/opengl/jni/graphics/GLUtils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/suite/cts/deviceTests/opengl/jni/graphics/GLUtils.cpp b/suite/cts/deviceTests/opengl/jni/graphics/GLUtils.cpp
index 9076f39d6e6..ea166a1495f 100644
--- a/suite/cts/deviceTests/opengl/jni/graphics/GLUtils.cpp
+++ b/suite/cts/deviceTests/opengl/jni/graphics/GLUtils.cpp
@@ -77,7 +77,8 @@ GLuint GLUtils::loadTexture(const char* path) {
}
static int readInt(char* b) {
- return (((int) b[0]) << 24) | (((int) b[1]) << 16) | (((int) b[2]) << 8) | ((int) b[3]);
+ unsigned char* ub = (unsigned char*) b;
+ return (((int) ub[0]) << 24) | (((int) ub[1]) << 16) | (((int) ub[2]) << 8) | ((int) ub[3]);
}
static float readFloat(char* b) {