summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-10-21 23:46:26 +0200
committerHaru <haru@dotalux.com>2017-10-21 23:46:26 +0200
commit9a2a89b7503584d5009dcc9ca1f5aa0a17673130 (patch)
tree2c440feba0d381ede523d456a82772f6bccd51da /src/map/atcommand.c
parent4db32c22afe61ef510ae0df6142af6a4ce6a5a5f (diff)
downloadhercules-9a2a89b7503584d5009dcc9ca1f5aa0a17673130.tar.gz
hercules-9a2a89b7503584d5009dcc9ca1f5aa0a17673130.tar.bz2
hercules-9a2a89b7503584d5009dcc9ca1f5aa0a17673130.tar.xz
hercules-9a2a89b7503584d5009dcc9ca1f5aa0a17673130.zip
Fix various warnings on Visual Studio 2017
Fixes #1867 Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index a59748b9e..d9f4810ee 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -4868,21 +4868,19 @@ ACMD(undisguiseguild)
*------------------------------------------*/
ACMD(exp)
{
- char output[CHAT_SIZE_MAX];
- double nextb, nextj;
-
- memset(output, '\0', sizeof(output));
+ double percentb = 0.0, percentj = 0.0;
+ uint64 nextb, nextj;
nextb = pc->nextbaseexp(sd);
- if (nextb)
- nextb = sd->status.base_exp*100.0/nextb;
+ if (nextb != 0)
+ percentb = sd->status.base_exp * 100.0 / nextb;
nextj = pc->nextjobexp(sd);
- if (nextj)
- nextj = sd->status.job_exp*100.0/nextj;
+ if (nextj != 0)
+ percentj = sd->status.job_exp * 100.0 / nextj;
- sprintf(output, msg_fd(fd,1148), sd->status.base_level, nextb, sd->status.job_level, nextj); // Base Level: %d (%.3f%%) | Job Level: %d (%.3f%%)
- clif->message(fd, output);
+ sprintf(atcmd_output, msg_fd(fd,1148), sd->status.base_level, percentb, sd->status.job_level, percentj); // Base Level: %d (%.3f%%) | Job Level: %d (%.3f%%)
+ clif->message(fd, atcmd_output);
return true;
}