aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/qreg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qreg.c b/src/qreg.c
index d49a4d6..8fca9e2 100644
--- a/src/qreg.c
+++ b/src/qreg.c
@@ -1341,8 +1341,8 @@ teco_ed_hook(teco_ed_hook_t type, GError **error)
};
error_add_frame:
- g_assert(0 <= type-1 && type-1 < G_N_ELEMENTS(type2name));
- teco_error_add_frame_edhook(type2name[type-1]);
+ g_assert(0 <= type && type < G_N_ELEMENTS(type2name));
+ teco_error_add_frame_edhook(type2name[type]);
return FALSE;
}