aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Ben Boeckel <mathstuf@gmail.com>2012-04-04 21:26:06 -0400
committerGravatar Ben Boeckel <mathstuf@gmail.com>2012-04-04 21:26:06 -0400
commit9bcc0d37f554b748f679ee1cfd1e984f2f19c92d (patch)
tree42e618c3ac193c8a5993477e5c4df56ddc86226b
parenteba0f53e6f6a3a387ebd498387962a8fdfc8f3d8 (diff)
Fix an off-by-one error
Awk strings are 1-indexed, so 1 needs to be added to the starting index.
-rwxr-xr-xexamples/data/scripts/load_cookies.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/data/scripts/load_cookies.sh b/examples/data/scripts/load_cookies.sh
index 380301e..5feca05 100755
--- a/examples/data/scripts/load_cookies.sh
+++ b/examples/data/scripts/load_cookies.sh
@@ -14,7 +14,7 @@ BEGIN {
}
$0 ~ /^#HttpOnly_/ {
gsub(/@/, "\\@")
- printf("add_cookie \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\"\n", substr($1,length("#HttpOnly_"),length($1)), $3, $6, $7, scheme[$4], $5)
+ printf("add_cookie \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\"\n", substr($1,length("#HttpOnly_")+1,length($1)), $3, $6, $7, scheme[$4], $5)
}
$0 !~ /^#/ {
gsub(/@/, "\\@")