summaryrefslogtreecommitdiff
path: root/src/common/grfio.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-08-07 03:39:13 +0200
committerHaru <haru@dotalux.com>2014-08-07 05:37:38 +0200
commitc45e3fa9793a273a0eab40d1626bcda7d710552c (patch)
tree4f6c9d47770a15c8cbfe065f7ee9203f77e57022 /src/common/grfio.c
parentcaf89724767465ecf339c391bb6d7a937d563fb2 (diff)
downloadhercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.tar.gz
hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.tar.bz2
hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.tar.xz
hercules-c45e3fa9793a273a0eab40d1626bcda7d710552c.zip
Corrected several format-string errors through the code
- Functions that expect a printf-style format string are now marked as such, so that gcc/clang will emit a warning warn you if you mismatch format string and arguments. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/grfio.c')
-rw-r--r--src/common/grfio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/grfio.c b/src/common/grfio.c
index 6e628a512..5be0c8237 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -655,7 +655,7 @@ static bool grfio_parse_restable_row(const char* row)
char local[256];
FILELIST* entry;
- if( sscanf(row, "%[^#\r\n]#%[^#\r\n]#", w1, w2) != 2 )
+ if (sscanf(row, "%255[^#\r\n]#%255[^#\r\n]#", w1, w2) != 2)
return false;
if( strstr(w2, ".gat") == NULL && strstr(w2, ".rsw") == NULL )
@@ -805,7 +805,7 @@ void grfio_init(const char* fname)
if( line[0] == '/' && line[1] == '/' )
continue; // skip comments
- if( sscanf(line, "%[^:]: %[^\r\n]", w1, w2) != 2 )
+ if (sscanf(line, "%1023[^:]: %1023[^\r\n]", w1, w2) != 2)
continue; // skip unrecognized lines
// Entry table reading