summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-11-02 14:09:23 +0100
committerSébastien Helleu <flashcode@flashtux.org>2018-11-02 14:09:23 +0100
commit8848b0e22aaba6f3d7116c7137ede3b43f393a85 (patch)
tree65ffb8531d608f899bffcd47bc8721ec059cdc26 /src/gui
parent74a17d821f066c41f1450e9fae805c1711482265 (diff)
downloadweechat-8848b0e22aaba6f3d7116c7137ede3b43f393a85.zip
api: return integer in function string_encode_base64
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-curses-window.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c
index 3b410dfd7..e9ff4aae3 100644
--- a/src/gui/curses/gui-curses-window.c
+++ b/src/gui/curses/gui-curses-window.c
@@ -2509,11 +2509,13 @@ gui_window_send_clipboard (const char *storage_unit, const char *text)
text_base64 = malloc ((length * 4) + 1);
if (text_base64)
{
- string_encode_base64 (text, length, text_base64);
- fprintf (stderr, "\033]52;%s;%s\a",
- (storage_unit) ? storage_unit : "",
- text_base64);
- fflush (stderr);
+ if (string_encode_base64 (text, length, text_base64) >= 0)
+ {
+ fprintf (stderr, "\033]52;%s;%s\a",
+ (storage_unit) ? storage_unit : "",
+ text_base64);
+ fflush (stderr);
+ }
free (text_base64);
}
}