diff --git a/src/builtin_functions.c b/src/builtin_functions.c
index f535c963465ad627b39c1d5e9d447142a557e26a..c0b8f6c6bc3f25fc687fbd55f9cb65f69e00e065 100644
--- a/src/builtin_functions.c
+++ b/src/builtin_functions.c
@@ -9293,7 +9293,7 @@ void f_enumerate(INT32 args)
          * false positives, but is much simpler to check than e.g. doing one check
          * for every iteration
          */
-        if (DO_INT_TYPE_MUL_OVERFLOW(n-1, step, &tmb) || INT_TYPE_ADD_OVERFLOW(tmp, start))
+        if (DO_INT_TYPE_MUL_OVERFLOW(n-1, step, &tmp) || INT_TYPE_ADD_OVERFLOW(tmp, start))
           goto slow_path;
       }