From 694a10271dd33aeba7a1cf3d72caf4f1384d611a Mon Sep 17 00:00:00 2001 From: bptato Date: Sun, 4 Apr 2021 17:57:13 +0200 Subject: Return Str from base64_encode, fix extraction of first gif frame for animations in put_image_kitty --- file.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'file.c') diff --git a/file.c b/file.c index 8718dd3..836af97 100644 --- a/file.c +++ b/file.c @@ -1179,11 +1179,7 @@ AuthBasicCred(struct http_auth *ha, Str uname, Str pw, ParsedURL *pu, Str s = Strdup(uname); Strcat_char(s, ':'); Strcat(s, pw); - char *base64 = base64_encode(s->ptr, s->length); - if (!base64) - return Strnew_charp("Basic "); - else - return Strnew_m_charp("Basic ", base64, NULL); + return Strnew_m_charp("Basic ", base64_encode(s->ptr, s->length)->ptr, NULL); } #ifdef USE_DIGEST_AUTH -- cgit v1.2.3