summaryrefslogtreecommitdiff
path: root/deb.c
diff options
context:
space:
mode:
Diffstat (limited to 'deb.c')
-rw-r--r--deb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/deb.c b/deb.c
index bccfc180e7..d16103eb1e 100644
--- a/deb.c
+++ b/deb.c
@@ -217,7 +217,9 @@ Perl_deb_stack_all(pTHX)
for (;;)
{
const size_t si_name_ix = si->si_type+1; /* -1 is a valid index */
- const char * const si_name = (si_name_ix >= sizeof(si_names)) ? "????" : si_names[si_name_ix];
+ const char * const si_name =
+ si_name_ix < C_ARRAY_LENGTH(si_names) ?
+ si_names[si_name_ix] : "????";
I32 ix;
PerlIO_printf(Perl_debug_log, "STACK %"IVdf": %s\n",
(IV)si_ix, si_name);