Skip to content

Commit

Permalink
Fixed OPCODE_READ_PARAM_FILEPATH macro. (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiranDMC authored Mar 2, 2024
1 parent f76bea0 commit 7d28bb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cleo_sdk/CLEO_Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ namespace CLEO

#define OPCODE_READ_PARAM_STRING_LEN(_varName, _maxLen) char _buff_##_varName[_maxLen + 1]; const char* ##_varName = _readParamText(thread, _buff_##_varName, _maxLen + 1); if(##_varName != nullptr) ##_varName = _buff_##_varName; if(!_paramWasString()) { return OpcodeResult::OR_INTERRUPT; }

#define OPCODE_READ_PARAM_FILEPATH(_varName) char _buff_##_varName[512]; _readParamText(thread, _buff_##_varName, 512); if(_paramWasString()) CLEO_ResolvePath(thread, _buff_##_varName, 512); else return OpcodeResult::OR_INTERRUPT; const char* _varName = _buff_##_varName;
#define OPCODE_READ_PARAM_FILEPATH(_varName) char _buff_##_varName[512]; const char* ##_varName = _readParamText(thread, _buff_##_varName, 512); if(##_varName != nullptr) ##_varName = _buff_##_varName; if(_paramWasString()) CLEO_ResolvePath(thread, _buff_##_varName, 512); else return OpcodeResult::OR_INTERRUPT;

#define OPCODE_READ_PARAM_PTR() _readParam(thread).pParam; \
if (!_paramWasInt()) { SHOW_ERROR("Input argument #%d expected to be integer, got %s in script %s\nScript suspended.", CLEO_GetParamsHandledCount(), CLEO::ToKindStr(_lastParamType, _lastParamArrayType), CLEO::ScriptInfoStr(thread).c_str()); return thread->Suspend(); } \
Expand Down

0 comments on commit 7d28bb8

Please sign in to comment.