From b8431ef147bb1f98ace6dcad5bfaa7d5e0a02897 Mon Sep 17 00:00:00 2001 From: ultramage Date: Thu, 4 Oct 2007 16:16:44 +0000 Subject: * Added MAX_HOTKEYS to supplement the HOTKEY_SAVING define * Fixed a compile problem when hotkey saving is disabled (topic:167265) * Added script source error reporting to countitem() (topic:167165) * Removed integer mob skill state/target definition support (unused) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11353 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char_sql/char.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/char_sql') diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 2244db57a..0f42d3b96 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -828,9 +828,10 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything struct item tmp_item; struct skill tmp_skill; struct s_friend tmp_friend; +#ifdef HOTKEY_SAVING struct hotkey tmp_hotkey; int hotkey_num; - +#endif memset(p, 0, sizeof(struct mmo_charstatus)); @@ -1041,7 +1042,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything while( SQL_SUCCESS == SqlStmt_NextRow(stmt) ) { - if( hotkey_num >= 0 && hotkey_num < HOTKEY_SAVING ) + if( hotkey_num >= 0 && hotkey_num < MAX_HOTKEYS ) memcpy(&p->hotkeys[hotkey_num], &tmp_hotkey, sizeof(tmp_hotkey)); else ShowWarning("mmo_char_fromsql: ignoring invalid hotkey (hotkey=%d,type=%u,id=%u,lv=%u) of character %s (AID=%d,CID=%d)\n", hotkey_num, tmp_hotkey.type, tmp_hotkey.id, tmp_hotkey.lv, p->name, p->account_id, p->char_id); -- cgit v1.2.3-60-g2f50