diff options
Diffstat (limited to 'src/char/inter.c')
-rw-r--r-- | src/char/inter.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/char/inter.c b/src/char/inter.c index c2d8de37a..ab53fc6da 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -107,7 +107,7 @@ bool msg_config_read(const char *cfg_name, bool allow_override) { while(fgets(line, sizeof(line), fp) ) { if (line[0] == '/' && line[1] == '/') continue; - if (sscanf(line, "%[^:]: %[^\r\n]", w1, w2) != 2) + if (sscanf(line, "%1023[^:]: %1023[^\r\n]", w1, w2) != 2) continue; if (strcmpi(w1, "import") == 0) @@ -562,7 +562,8 @@ void inter_vmsg_to_fd(int fd, int u_fd, int aid, char* msg, va_list ap) { * @param msg Message format string * @param ... Additional parameters for (v)sprinf */ -void inter_msg_to_fd(int fd, int u_fd, int aid, char* msg, ...) { +void inter_msg_to_fd(int fd, int u_fd, int aid, char *msg, ...) __attribute__((format(printf, 4, 5))); +void inter_msg_to_fd(int fd, int u_fd, int aid, char *msg, ...) { va_list ap; va_start(ap,msg); inter_vmsg_to_fd(fd, u_fd, aid, msg, ap); @@ -917,9 +918,8 @@ static int inter_config_read(const char* cfgName) return 1; } - while(fgets(line, sizeof(line), fp)) - { - i = sscanf(line, "%[^:]: %[^\r\n]", w1, w2); + while (fgets(line, sizeof(line), fp)) { + i = sscanf(line, "%1023[^:]: %1023[^\r\n]", w1, w2); if(i != 2) continue; |