summaryrefslogtreecommitdiff
path: root/GL/glx/indirect_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'GL/glx/indirect_util.c')
-rw-r--r--GL/glx/indirect_util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/GL/glx/indirect_util.c b/GL/glx/indirect_util.c
index 3964cd52d..93f1484d7 100644
--- a/GL/glx/indirect_util.c
+++ b/GL/glx/indirect_util.c
@@ -289,7 +289,7 @@ __glXGetProtocolDecodeFunction(const struct __glXDispatchInfo *dispatch_info,
return (func_index < 0)
? NULL
- : dispatch_info->dispatch_functions[func_index][swapped_version];
+ : (void *) dispatch_info->dispatch_functions[func_index][swapped_version];
}
@@ -300,13 +300,14 @@ __glXGetProtocolSizeData(const struct __glXDispatchInfo *dispatch_info,
if (dispatch_info->size_table != NULL) {
const int func_index = get_decode_index(dispatch_info, opcode);
- if (func_index >= 0) {
+ if ((func_index >= 0)
+ && (dispatch_info->size_table[func_index][0] != 0)) {
const int var_offset =
dispatch_info->size_table[func_index][1];
data->bytes = dispatch_info->size_table[func_index][0];
data->varsize = (var_offset != ~0)
- ? dispatch_info->size_table[func_index]
+ ? dispatch_info->size_func_table[var_offset]
: NULL;
return 0;