[hackers] [surf] Fixed a bug in pagestat || Jens Nyberg

From: <git_AT_suckless.org>
Date: Fri, 15 Feb 2013 17:44:31 +0100

commit 053a8f1a73b8a3fe4e090dd12fe05e28f4594ab3
Author: Jens Nyberg <jens.nyberg_AT_gmail.com>
Date: Fri Feb 15 00:57:36 2013 +0100

    Fixed a bug in pagestat
    
    Forgot to add a null character at the end.
    
    Signed-off-by: Christoph Lohmann <20h_AT_r-36.net>

diff --git a/surf.c b/surf.c
index b36fc4a..78226b2 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -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,
_AT_@ -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] = '
Received on Fri Feb 15 2013 - 17:44:31 CET

This archive was generated by hypermail 2.3.0 : Thu Feb 21 2013 - 19:26:37 CET