diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/script-fun.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/script-fun.cpp b/src/map/script-fun.cpp index beabef3..13a635d 100644 --- a/src/map/script-fun.cpp +++ b/src/map/script-fun.cpp @@ -3813,7 +3813,10 @@ void builtin_get(ScriptState *st) } if (bl == nullptr) + { + push_int<ScriptDataInt>(st->stack, -1); return; + } int var = pc_readparam(bl, reg.sp()); push_int<ScriptDataInt>(st->stack, var); return; @@ -3869,9 +3872,8 @@ void builtin_get(ScriptState *st) if (!bl) { - PRINTF("builtin_get: no block list attached %s!\n"_fmt, conv_str(st, &AARG(1))); if (postfix == '$') - push_str<ScriptDataStr>(st->stack, conv_str(st, &AARG(1))); + push_str<ScriptDataStr>(st->stack, ""_s); else push_int<ScriptDataInt>(st->stack, 0); return; |