summaryrefslogtreecommitdiff
path: root/TSRM
diff options
context:
space:
mode:
Diffstat (limited to 'TSRM')
-rw-r--r--TSRM/TSRM.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c
index 89e7b048a7..121eb81c5d 100644
--- a/TSRM/TSRM.c
+++ b/TSRM/TSRM.c
@@ -81,7 +81,12 @@ static FILE *tsrm_error_file;
}
#else
#define TSRM_ERROR
-#define TSRM_SAFE_RETURN_RSRC(array, offset, range) return array[offset]
+#define TSRM_SAFE_RETURN_RSRC(array, offset, range) \
+ if (offset==0) { \
+ return &array; \
+ } else { \
+ return array[TSRM_UNSHUFFLE_RSRC_ID(offset)]; \
+ }
#endif
#if defined(PTHREADS)