ThomasDickey / original-mawk

bug-reports for mawk (originally on GoogleCode)
http://invisible-island.net/mawk/mawk.html
17 stars 2 forks source link

minor int/Int typo in REcompile #73

Open eggert opened 7 months ago

eggert commented 7 months ago

This is with mawk 1.3.4 20231126. Here is a fix. The problem occurs only with 2**31 or more repetitions so this is only a theoretical bug.

--- rexp.c.~1~  2023-07-30 13:48:27.000000000 -0700
+++ rexp.c  2023-12-09 14:38:26.102323420 -0800
@@ -235,7 +235,7 @@
        TRACE(("RE_lex token %s\n", token_name(T_PLUS)));
 #endif
        } else {        /* n or more */
-       register int i;
+       register Int i;
        /* copy 2 copies of m_ptr, use 2nd copy to replace
           the first copy that gets swallowed by concat */
        MACHINE *result_mp = m_ptr;
ThomasDickey commented 7 months ago

thanks - will do