From 663c9c7ce25d3df3749c55c28af162c46015bc92 Mon Sep 17 00:00:00 2001 From: Paradox924X Date: Tue, 7 Dec 2010 18:38:03 +0000 Subject: 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 --- src/map/intif.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/intif.c') 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; -- cgit v1.2.3-60-g2f50