original-mawk icon indicating copy to clipboard operation
original-mawk copied to clipboard

minor int/Int typo in REcompile

Open eggert opened this issue 2 years ago • 1 comments

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;

eggert avatar Dec 09 '23 23:12 eggert

thanks - will do

ThomasDickey avatar Dec 09 '23 23:12 ThomasDickey