summaryrefslogtreecommitdiff
path: root/src/map/mail.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-09 00:49:38 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-09 00:49:38 +0000
commitef008fd94916820f82d765a48d8502cbba974ce1 (patch)
treedc2b61021b521ea9745b795aa632b37cc9d80519 /src/map/mail.c
parent780c68710e643b16c3751793d89433264152f21f (diff)
downloadhercules-ef008fd94916820f82d765a48d8502cbba974ce1.tar.gz
hercules-ef008fd94916820f82d765a48d8502cbba974ce1.tar.bz2
hercules-ef008fd94916820f82d765a48d8502cbba974ce1.tar.xz
hercules-ef008fd94916820f82d765a48d8502cbba974ce1.zip
- Crash-protections in the mail-checking function.
- Changed a bunch of msg_table use into msg_txt in atcommand.c, there's still a lot left... am not feeling inspired to finish this >.< - Some additional parenthesis on equipment check in pc_equipitem, seems to have fixed the mid/lower headgear-sprites not showing up. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8195 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mail.c')
-rw-r--r--src/map/mail.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/map/mail.c b/src/map/mail.c
index 353ddd2d6..316bc9c18 100644
--- a/src/map/mail.c
+++ b/src/map/mail.c
@@ -43,7 +43,7 @@ int mail_timer;
int mail_check(struct map_session_data *sd,int type)
{
int i = 0, new_ = 0, priority = 0;
- char message[50];
+ char message[80];
nullpo_retr (0, sd);
@@ -82,20 +82,17 @@ int mail_check(struct map_session_data *sd,int type)
priority++;
if(type==2 || type==3) {
if(atoi(mail_row[4])) {
- //sprintf(message, "%d - From : %s (New - Priority)", i, mail_row[2]);
- sprintf(message, msg_txt(511), i, mail_row[2]);
-
- clif_displaymessage(sd->fd, jstrescape(message));
+ snprintf(message, 80, msg_txt(511), i, mail_row[2]);
+ clif_displaymessage(sd->fd, message);
} else {
//sprintf(message, "%d - From : %s (New)", i, mail_row[2]);
- sprintf(message, msg_txt(512), i, mail_row[2]);
- clif_displaymessage(sd->fd, jstrescape(message));
+ snprintf(message, 80, msg_txt(512), i, mail_row[2]);
+ clif_displaymessage(sd->fd, message);
}
}
} else if(type==2){
- //sprintf(message, "%d - From : %s", i, mail_row[2]);
- sprintf(message, msg_txt(513), i, mail_row[2]);
- clif_displaymessage(sd->fd, jstrescape(message));
+ snprintf(message, 80, msg_txt(513), i, mail_row[2]);
+ clif_displaymessage(sd->fd, message);
}
}