diff options
author | Paradox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-12-07 18:38:03 +0000 |
---|---|---|
committer | Paradox924X <Paradox924X@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-12-07 18:38:03 +0000 |
commit | 663c9c7ce25d3df3749c55c28af162c46015bc92 (patch) | |
tree | 29acf07133e1b5b1bc055481c5667b4133e740cf /src/map/intif.c | |
parent | 53daf01b4b07ce131c79fc784220ba6826e70d16 (diff) | |
download | hercules-663c9c7ce25d3df3749c55c28af162c46015bc92.tar.gz hercules-663c9c7ce25d3df3749c55c28af162c46015bc92.tar.bz2 hercules-663c9c7ce25d3df3749c55c28af162c46015bc92.tar.xz hercules-663c9c7ce25d3df3749c55c28af162c46015bc92.zip |
Changed almost all instances of sprintf() to snprintf().
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14563 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/intif.c')
-rw-r--r-- | src/map/intif.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/intif.c b/src/map/intif.c index 15d948c59..4ecabac1a 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -262,8 +262,8 @@ int intif_regtostr(char* str, struct global_reg *reg, int qty) int len =0, i; for (i = 0; i < qty; i++) { - len+= sprintf(str+len, "%s", reg[i].str)+1; //We add 1 to consider the '\0' in place. - len+= sprintf(str+len, "%s", reg[i].value)+1; + len+= snprintf(str+len, sizeof (str+len), "%s", reg[i].str)+1; //We add 1 to consider the '\0' in place. + len+= snprintf(str+len, sizeof (str+len), "%s", reg[i].value)+1; } return len; } @@ -1471,7 +1471,7 @@ int intif_parse_Mail_inboxreceived(int fd) else { char output[128]; - sprintf(output, msg_txt(510), sd->mail.inbox.unchecked, sd->mail.inbox.unread + sd->mail.inbox.unchecked); + snprintf(output, sizeof output, msg_txt(510), sd->mail.inbox.unchecked, sd->mail.inbox.unread + sd->mail.inbox.unchecked); clif_disp_onlyself(sd, output, strlen(output)); } return 0; |