Check-in by ben on 2022-12-24 21:21:10
Use j instead of i in function uri_encode() to avoid infinite
iteration resulting from awk variable name collision
INSERTED DELETED
2 2 mmhtml.awk
2 2 TOTAL over 1 changed file
Index: mmhtml.awk
==================================================================
--- mmhtml.awk
+++ mmhtml.awk
@@ -239,12 +239,12 @@
}
function uri_encode(str) {
len = length(str)
retval = ""
- for (i = 1; i <= len; i++) {
- c = substr(str, i, 1)
+ for (j = 1; j <= len; j++) {
+ c = substr(str, j, 1)
retval = retval uri_encode_tab[uri_encode_ord[c]]
}
return retval
}