From c7802eeaadfcc822a593e6c26b538f347f9d0e91 Mon Sep 17 00:00:00 2001
From: schneider <schneider@blinkenlichts.net>
Date: Thu, 5 Dec 2019 18:44:15 +0100
Subject: [PATCH] fix(config): Clarify what happens when the buffer is too
 small

---
 epicardium/epicardium.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/epicardium/epicardium.h b/epicardium/epicardium.h
index 496efe82..096c48f3 100644
--- a/epicardium/epicardium.h
+++ b/epicardium/epicardium.h
@@ -1958,7 +1958,11 @@ API(API_CONFIG_GET_INTEGER, int epic_config_get_integer(const char *key, int *va
 API(API_CONFIG_GET_BOOLEAN, int epic_config_get_boolean(const char *key, bool *value));
 
 /**
- * Read a string from the configuration file
+ * Read a string from the configuration file.
+ *
+ * If the buffer supplied is too small for the config option,
+ * no error is reported and the first `buf_len - 1` characters
+ * are returned (0 terminated).
  *
  * :param char* key: Name of the option to read
  * :param char* buf: Place to read the string into
-- 
GitLab