summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-03-27 16:41:12 -0300
committerEuAndreh <eu@euandre.org>2025-03-27 16:41:12 -0300
commit4fe62dca0aea7250c76a2a6ace2059dbbe2b7e80 (patch)
treedd3696d2bc59952b561df55089294f695317491c
parentsrc/ifok: Add working utility (diff)
downloadeut-4fe62dca0aea7250c76a2a6ace2059dbbe2b7e80.tar.gz
eut-4fe62dca0aea7250c76a2a6ace2059dbbe2b7e80.tar.xz
src/uri: Fix off-by-one end of string
-rwxr-xr-xsrc/uri2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/uri b/src/uri
index 39f1409..b9a5f58 100755
--- a/src/uri
+++ b/src/uri
@@ -9,7 +9,7 @@ BEGIN {
}
{
- for (i = 1; i < length($0); i++) {
+ for (i = 1; i <= length($0); i++) {
c = substr($0, i, 1)
printf "%s", (c ~ /^[-._a-zA-Z0-9]$/ ? c : hex[c])
}