aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-03-11 01:59:41 +0100
committerSven Gothel <[email protected]>2014-03-11 01:59:41 +0100
commit39808869938902c4f1766cd0c5b2c430d810d001 (patch)
treeea15ba938b676ba642aa54d158460080829c1b7d /make/config/jogl
parent95690a4224a1235f76675700efacba17db1e9bbd (diff)
parentba0dc6462a88ee7512a087deaaca760239915548 (diff)
Merge branch 'master' into 2.2-train
Diffstat (limited to 'make/config/jogl')
-rw-r--r--make/config/jogl/glx-CustomCCode.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/make/config/jogl/glx-CustomCCode.c b/make/config/jogl/glx-CustomCCode.c
index 3f5cf1121..b077c65ac 100644
--- a/make/config/jogl/glx-CustomCCode.c
+++ b/make/config/jogl/glx-CustomCCode.c
@@ -141,13 +141,16 @@ Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXChooseFBConfig(JNIEnv *env, jclass _
count = _nitems_ptr[0];
if (NULL == _res) return NULL;
- /** Bug 961: Validate returned 'GLXFBConfig *', i.e. remove NULL pointer. */
+ /**
+ * Bug 961: Validate returned 'GLXFBConfig *', i.e. remove NULL pointer.
+ * Note: sizeof(GLXFBConfig) == sizeof(void*), a.k.a a pointer
+ */
// fprintf(stderr, "glXChooseFBConfig.0: Count %d\n", count);
i=0;
while( i < count ) {
if( NULL == _res[i] ) {
if( 0 < count-i-1 ) {
- memmove(_res+i, _res+i+1, count-i-1);
+ memmove(_res+i, _res+i+1, (count-i-1)*sizeof(GLXFBConfig));
}
count--;
} else {
@@ -188,12 +191,15 @@ Java_jogamp_opengl_x11_glx_GLX_dispatch_1glXGetFBConfigs(JNIEnv *env, jclass _un
count = _nelements_ptr[0];
if (NULL == _res) return NULL;
- /** Bug 961: Validate returned 'GLXFBConfig *', i.e. remove NULL pointer. */
+ /**
+ * Bug 961: Validate returned 'GLXFBConfig *', i.e. remove NULL pointer.
+ * Note: sizeof(GLXFBConfig) == sizeof(void*), a.k.a a pointer
+ */
i=0;
while( i < count ) {
if( NULL == _res[i] ) {
if( 0 < count-i-1 ) {
- memmove(_res+i, _res+i+1, count-i-1);
+ memmove(_res+i, _res+i+1, (count-i-1)*sizeof(GLXFBConfig));
}
count--;
} else {