summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Nyberg <jens.nyberg@gmail.com>2013-02-15 00:57:36 +0100
committerChristoph Lohmann <20h@r-36.net>2013-02-15 17:42:06 +0100
commit053a8f1a73b8a3fe4e090dd12fe05e28f4594ab3 (patch)
tree6b3e8cd5eb9015acac6ff14f8290198b5a9e21af
parentba634ea8e3b884c4610c89d4491e70729d53bc43 (diff)
downloadsurf-053a8f1a73b8a3fe4e090dd12fe05e28f4594ab3.tar.gz
surf-053a8f1a73b8a3fe4e090dd12fe05e28f4594ab3.tar.bz2
surf-053a8f1a73b8a3fe4e090dd12fe05e28f4594ab3.zip
Fixed a bug in pagestat
Forgot to add a null character at the end. Signed-off-by: Christoph Lohmann <20h@r-36.net>
-rw-r--r--surf.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/surf.c b/surf.c
index b36fc4a..78226b2 100644
--- a/surf.c
+++ b/surf.c
@@ -84,7 +84,7 @@ static gboolean showxid = FALSE;
static char winid[64];
static gboolean usingproxy = 0;
static char togglestat[5];
-static char pagestat[2];
+static char pagestat[3];
static void beforerequest(WebKitWebView *w, WebKitWebFrame *f,
WebKitWebResource *r, WebKitNetworkRequest *req,
@@ -1066,12 +1066,15 @@ static void
getpagestat(Client *c) {
const char *uri = geturi(c);
- if(strstr(uri, "https://") == uri)
+ if(strstr(uri, "https://") == uri) {
pagestat[0] = c->sslfailed ? 'U' : 'T';
- else
+ } else {
pagestat[0] = '-';
+ }
pagestat[1] = usingproxy ? 'P' : '-';
+ pagestat[2] = '\0';
+
}
static void