diff options
Diffstat (limited to 'tools/codegen/core/gen_static_metadata.py')
-rwxr-xr-x | tools/codegen/core/gen_static_metadata.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index b7c9533602..1a2911cd04 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -424,7 +424,7 @@ static uint32_t %(name)s_phash(uint32_t i) { i %(offset_sign)s= %(offset)d; uint32_t x = i %% %(t)d; uint32_t y = i / %(t)d; - return x + (uint32_t)%(name)s_r[y]; + return y < GPR_ARRAY_SIZE(%(name)s_r) ? x + (uint32_t)%(name)s_r[y] : 0; } """ % { 'name': name, |