Loading opengl/libs/EGL/Loader.cpp +6 −4 Original line number Original line Diff line number Diff line Loading @@ -200,11 +200,13 @@ void Loader::init_api(void* dso, } } if (f == NULL) { if (f == NULL) { // Try with the OES postfix // Try with the OES postfix ssize_t index = ssize_t(strlen(name)) - 3; ssize_t size = ssize_t(strlen(name)); ssize_t index = size - 3; if ((index>0 && (index<252)) && (strcmp(name+index, "OES"))) { if ((index>0 && (index<252)) && (strcmp(name+index, "OES"))) { strncpy(scrap, name, index); strncpy(scrap, name, sizeof(scrap) - 1); scrap[index] = 0; scrap[size] = 0; strcat(scrap, "OES"); strncat(scrap, "OES", sizeof(scrap) - 1); scrap[size + 3] = 0; f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap); f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap); //LOGD_IF(f, "found <%s> instead", scrap); //LOGD_IF(f, "found <%s> instead", scrap); } } Loading Loading
opengl/libs/EGL/Loader.cpp +6 −4 Original line number Original line Diff line number Diff line Loading @@ -200,11 +200,13 @@ void Loader::init_api(void* dso, } } if (f == NULL) { if (f == NULL) { // Try with the OES postfix // Try with the OES postfix ssize_t index = ssize_t(strlen(name)) - 3; ssize_t size = ssize_t(strlen(name)); ssize_t index = size - 3; if ((index>0 && (index<252)) && (strcmp(name+index, "OES"))) { if ((index>0 && (index<252)) && (strcmp(name+index, "OES"))) { strncpy(scrap, name, index); strncpy(scrap, name, sizeof(scrap) - 1); scrap[index] = 0; scrap[size] = 0; strcat(scrap, "OES"); strncat(scrap, "OES", sizeof(scrap) - 1); scrap[size + 3] = 0; f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap); f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap); //LOGD_IF(f, "found <%s> instead", scrap); //LOGD_IF(f, "found <%s> instead", scrap); } } Loading