From cd8f4cb83fb9aaa86d5bad6979e3bdab7ef7f7b2 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Wed, 29 Sep 2021 12:47:35 +0000 Subject: email: Do not use an empty bytevector to test the charset. Using an empty bytevector no longer throws an exception since Guile commit 5ea8c69e9153a970952bf6f0b32c4fad6a28e839. * email/email.scm (post-process-content-transfer-encoding): Use a bytevector of unit length to test the charset validity. Signed-off-by: Arun Isaac --- email/email.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/email/email.scm b/email/email.scm index 3f4e194..277be88 100644 --- a/email/email.scm +++ b/email/email.scm @@ -1,5 +1,6 @@ ;;; guile-email --- Guile email parser ;;; Copyright © 2018, 2019, 2020, 2021 Arun Isaac +;;; Copyright © 2021 Mathieu Othacehe ;;; ;;; This file is part of guile-email. ;;; @@ -832,7 +833,7 @@ values. The returned headers is a string and body is a bytevector." (define (valid-charset? charset) (catch #t (lambda () - (bytevector->string (make-bytevector 0 0) charset) + (bytevector->string (make-bytevector 1 0) charset) #t) (const #f))) -- cgit v1.2.3