summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-05-17 02:35:40 +0200
committerHaru <haru@dotalux.com>2015-05-17 02:35:53 +0200
commitb9a8ad743a78d5053482cb4d47d2795252ec9095 (patch)
tree40d10510054cd3dd254c366ccbe550817cb3e4ec /src/map/script.c
parentb2b597c523f19fbacaf052117d47f254483c6e0e (diff)
downloadhercules-b9a8ad743a78d5053482cb4d47d2795252ec9095.tar.gz
hercules-b9a8ad743a78d5053482cb4d47d2795252ec9095.tar.bz2
hercules-b9a8ad743a78d5053482cb4d47d2795252ec9095.tar.xz
hercules-b9a8ad743a78d5053482cb4d47d2795252ec9095.zip
Fixed some issues detected by coverity scan
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 898d341ed..bcc3fd710 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -406,7 +406,7 @@ unsigned int calc_hash_ci(const char* p) {
/// Looks up string using the provided id.
const char* script_get_str(int id)
{
- Assert( id >= LABEL_START && id < script->str_size );
+ Assert_retr(NULL, id >= LABEL_START && id < script->str_size);
return script->str_buf+script->str_data[id].str;
}
@@ -462,7 +462,7 @@ const char *script_casecheck_add_str_sub(struct casecheck_data *ccd, const char
int i;
for (i = ccd->str_hash[h]; ; i = ccd->str_data[i].next) {
const char *s = NULL;
- Assert( i >= 0 && i < ccd->str_size );
+ Assert_retb(i >= 0 && i < ccd->str_size);
s = ccd->str_buf+ccd->str_data[i].str;
if (strcasecmp(s,p) == 0) {
return s; // string already in list