summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-08-22 16:21:47 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-08-22 16:21:47 +0000
commit96e6c1e20546e9b1130e4662288a107ef6a4db00 (patch)
treefaf15cfab486a8a91181c7f3028bbd984f7181bc
parent600b76ca4b5ade70db3864af27a6bcce09a86d4f (diff)
Fixed regression introduced in recent code cleanup
The relative "luck" was that the {{{i < s[i] != '\0'}}} expression is actually working for small strings with standard ascii characters (...)
-rw-r--r--src/htsserver.h2
-rw-r--r--src/htstools.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/htsserver.h b/src/htsserver.h
index 51a44b2..0ad5b8f 100644
--- a/src/htsserver.h
+++ b/src/htsserver.h
@@ -275,7 +275,7 @@ static int ehex(char *s) {
HTS_UNUSED static void unescapehttp(char *s, String * tempo) {
size_t i;
- for(i = 0; i < s[i] != '\0'; i++) {
+ for(i = 0; s[i] != '\0'; i++) {
if (s[i] == '%' && s[i + 1] == '%') {
i++;
StringAddchar(*tempo, '%');
diff --git a/src/htstools.c b/src/htstools.c
index 65f868a..4d5c9db 100644
--- a/src/htstools.c
+++ b/src/htstools.c
@@ -99,7 +99,7 @@ static int ehex(char *s) {
static void unescapehttp(char *s, String * tempo) {
size_t i;
- for(i = 0; i < s[i] != '\0'; i++) {
+ for(i = 0; s[i] != '\0'; i++) {
if (s[i] == '%' && s[i + 1] == '%') {
i++;
StringAddchar(*tempo, '%');