summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-03-11 15:31:07 -0300
committershennetsind <ind@henn.et>2014-03-11 15:31:07 -0300
commit302ba47df72db7f34b9146df81a155bbd29602f4 (patch)
tree10851bc5723558aa9b464107aa375d187fb5f86e
parent400c6a2e625197f70326587401b13ab02659682f (diff)
downloadhercules-302ba47df72db7f34b9146df81a155bbd29602f4.tar.gz
hercules-302ba47df72db7f34b9146df81a155bbd29602f4.tar.bz2
hercules-302ba47df72db7f34b9146df81a155bbd29602f4.tar.xz
hercules-302ba47df72db7f34b9146df81a155bbd29602f4.zip
Fixed Bug 8067
Sample plugin compiler error on msvc, credits to AnnieRuru (Thank you!) http://hercules.ws/board/tracker/issue-8067-pluginsamplec-throws-error-on-microsoft-compiler/ Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--src/plugins/sample.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/sample.c b/src/plugins/sample.c
index 750ab31f9..819aae08c 100644
--- a/src/plugins/sample.c
+++ b/src/plugins/sample.c
@@ -13,6 +13,7 @@
#include "../map/script.h"
#include "../map/pc.h"
#include "../map/clif.h"
+#include "../common/strlib.h"
#include "../common/HPMDataCheck.h" /* should always be the last file included! (if you don't make it last, it'll intentionally break compile time) */
@@ -106,7 +107,7 @@ int my_pc_dropitem_post(int retVal, struct map_session_data *sd,int *n,int *amou
if( retVal != 1 ) return retVal;/* we don't do anything if pc_dropitem didn't return 1 (success) */
if( my_pc_dropitem_storage ) {/* signs whether pre-hook did this */
char output[99];
- snprintf(output,99,"[ Warning ] you can only drop 1 item at a time, capped from %d to 1",my_pc_dropitem_storage);
+ safesnprintf(output,99,"[ Warning ] you can only drop 1 item at a time, capped from %d to 1",my_pc_dropitem_storage);
clif->colormes(sd->fd,COLOR_RED,output);
}
return 1;
@@ -131,6 +132,7 @@ HPExport void plugin_init (void) {
script = GET_SYMBOL("script");
clif = GET_SYMBOL("clif");
pc = GET_SYMBOL("pc");
+ strlib = GET_SYMBOL("strlib");
/* session[] */
session = GET_SYMBOL("session");