diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2015-04-10 18:57:30 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2015-04-10 18:57:30 +0800 |
commit | d47bc1a787ed5feecbc6bbcee1de960f5e5e919b (patch) | |
tree | 77903f022c3e4d880005ff7045d920ef627d7469 /src/char/int_quest.c | |
parent | 8b27b383acb7b16813cd0c10cd11b0cce3523eb1 (diff) | |
parent | 65ec2372eed350ba5796e9c9be0e092e5ffa4ff4 (diff) | |
download | hercules-d47bc1a787ed5feecbc6bbcee1de960f5e5e919b.tar.gz hercules-d47bc1a787ed5feecbc6bbcee1de960f5e5e919b.tar.bz2 hercules-d47bc1a787ed5feecbc6bbcee1de960f5e5e919b.tar.xz hercules-d47bc1a787ed5feecbc6bbcee1de960f5e5e919b.zip |
Merge pull request #482 from 4144/checks
Add missing checks to char server
Diffstat (limited to 'src/char/int_quest.c')
-rw-r--r-- | src/char/int_quest.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/char/int_quest.c b/src/char/int_quest.c index dd3d4e1bf..1d64f48a3 100644 --- a/src/char/int_quest.c +++ b/src/char/int_quest.c @@ -16,6 +16,7 @@ #include "../common/db.h" #include "../common/malloc.h" #include "../common/mmo.h" +#include "../common/nullpo.h" #include "../common/showmsg.h" #include "../common/socket.h" #include "../common/sql.h" @@ -66,8 +67,9 @@ struct quest *mapif_quests_fromsql(int char_id, int *count) || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &tmp_quest.quest_id, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &tmp_quest.state, 0, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UINT, &tmp_quest.time, 0, NULL, NULL) - ) + ) { sqlerror = SQL_ERROR; + } StrBuf->Destroy(&buf); @@ -244,6 +246,7 @@ int mapif_parse_quest_save(int fd) void mapif_send_quests(int fd, int char_id, struct quest *tmp_questlog, int num_quests) { + nullpo_retv(tmp_questlog); WFIFOHEAD(fd,num_quests*sizeof(struct quest)+8); WFIFOW(fd,0) = 0x3860; WFIFOW(fd,2) = num_quests*sizeof(struct quest)+8; |