mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
When parsing and compiling a script, return the length in an output parameter instead so the method can return a boolean to indicate success.
This fixes #221 where a script with no code would fail.
This commit is contained in:
parent
9eec50d69f
commit
e3beec985e
3 changed files with 41 additions and 32 deletions
|
@ -163,8 +163,8 @@ public:
|
|||
|
||||
char *Preprocess(char *sourceBuffer);
|
||||
void Preclean(char *processedBuffer);
|
||||
size_t Parse(GameScript *m_GameScript, char *sourceBuffer, const char *type);
|
||||
size_t Compile(GameScript *m_GameScript, unsigned char *progBuffer);
|
||||
bool Parse(GameScript *m_GameScript, char *sourceBuffer, const char *type, size_t& outLength);
|
||||
bool Compile(GameScript *m_GameScript, unsigned char *progBuffer, size_t& outLength);
|
||||
|
||||
static str GetLine(str content, int line);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue