summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-09-25 00:29:15 +0200
committerHaru <haru@dotalux.com>2013-09-25 00:29:15 +0200
commit44c9ba35b0bc2d9f4dc82db20be824e6e0d320e7 (patch)
tree1c1e300503d99ecbe8b41355daa716858aaece5d /src/char
parentb9c8f57b92d2935db971a38e144529682712dc82 (diff)
downloadhercules-44c9ba35b0bc2d9f4dc82db20be824e6e0d320e7.tar.gz
hercules-44c9ba35b0bc2d9f4dc82db20be824e6e0d320e7.tar.bz2
hercules-44c9ba35b0bc2d9f4dc82db20be824e6e0d320e7.tar.xz
hercules-44c9ba35b0bc2d9f4dc82db20be824e6e0d320e7.zip
Renamed more forgotten variables during interface conversions
(related: b9c8f57) Most renames are trivial (just to avoid shadowing global variables, even if they currently did no harm), but there were some cases of partly renamed variables that caused some NULL checks to always pass and who knows what could have been happened when they were too subtle to make the application crash. Also corrected some potentially unsafe macro definitions Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char')
-rw-r--r--src/char/inter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/char/inter.c b/src/char/inter.c
index 4eb4f0c0a..a6d2485cb 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -490,7 +490,7 @@ void mapif_parse_accinfo(int fd) {
/* it will only get here if we have a single match */
if( account_id ) {
- char userid[NAME_LENGTH], user_pass[NAME_LENGTH], email[40], last_ip[20], lastlogin[30], pincode[5], birthdate[11];
+ char userid[NAME_LENGTH], user_pass[NAME_LENGTH], email[40], last_ip[20], lastlogin[30], pin_code[5], birthdate[11];
short level = -1;
int logincount = 0,state = 0;
// FIXME: No, this doesn't really look right. We can't, and shouldn't, access the login table from the char server.
@@ -512,7 +512,7 @@ void mapif_parse_accinfo(int fd) {
SQL->GetData(sql_handle, 5, &data, NULL); safestrncpy(lastlogin, data, sizeof(lastlogin));
SQL->GetData(sql_handle, 6, &data, NULL); logincount = atoi(data);
SQL->GetData(sql_handle, 7, &data, NULL); state = atoi(data);
- SQL->GetData(sql_handle, 8, &data, NULL); safestrncpy(pincode, data, sizeof(pincode));
+ SQL->GetData(sql_handle, 8, &data, NULL); safestrncpy(pin_code, data, sizeof(pin_code));
SQL->GetData(sql_handle, 9, &data, NULL); safestrncpy(birthdate, data, sizeof(birthdate));
}
@@ -525,8 +525,8 @@ void mapif_parse_accinfo(int fd) {
inter_to_fd(fd, u_fd, aid, "User: %s | GM Group: %d | State: %d", userid, level, state );
if (level < castergroup) { /* only show pass if your gm level is greater than the one you're searching for */
- if( strlen(pincode) )
- inter_to_fd(fd, u_fd, aid, "Password: %s (PIN:%s)", user_pass, pincode );
+ if( strlen(pin_code) )
+ inter_to_fd(fd, u_fd, aid, "Password: %s (PIN:%s)", user_pass, pin_code );
else
inter_to_fd(fd, u_fd, aid, "Password: %s", user_pass );
}