diff --git a/src/charset.c b/src/charset.c index b19e344..eeebf17 100644 --- a/src/charset.c +++ b/src/charset.c @@ -555,7 +555,7 @@ load_charset_map_from_vector (struct charset *charset, Lisp_Object vec, int cont if (len % 2 == 1) { - add_to_log ("Failure in loading charset map: %V", vec, Qnil); + add_to_log ("Failure in loading charset map: %V", vec); return; } diff --git a/src/image.c b/src/image.c index 066db74..313419b 100644 --- a/src/image.c +++ b/src/image.c @@ -629,16 +629,19 @@ valid_image_p (Lisp_Object object) } -/* Log error message with format string FORMAT and argument ARG. +/* Log error message with format string FORMAT and trailing arguments. Signaling an error, e.g. when an image cannot be loaded, is not a good idea because this would interrupt redisplay, and the error message display would lead to another redisplay. This function therefore simply displays a message. */ static void -image_error (const char *format, Lisp_Object arg1, Lisp_Object arg2) +image_error (const char *format, ...) { - add_to_log (format, arg1, arg2); + va_list ap; + va_start (ap, format); + vadd_to_log (format, ap); + va_end (ap); }