Browse Source

Unify compiler OOM error messages.

release/v0.1
Rafal Kupiec 1 year ago
parent
commit
cb455c3c73
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      engine/compiler.c

+ 2
- 2
engine/compiler.c View File

@ -2236,7 +2236,7 @@ static sxi32 PH7_CompileVar(ph7_gen_state *pGen) {
/* Duplicate variable name */
zDup = SyMemBackendStrDup(&pGen->pVm->sAllocator, pName->zString, pName->nByte);
if(zDup == 0) {
PH7_GenCompileError(&(*pGen), E_ERROR, nLine, "Fatal, PH7 engine is running out of memory");
PH7_GenCompileError(&(*pGen), E_ERROR, nLine, "PH7 engine is running out-of-memory");
}
SyStringInitFromBuf(&sStatic.sName, zDup, pName->nByte);
/* Check if we have an expression to compile */
@ -2263,7 +2263,7 @@ static sxi32 PH7_CompileVar(ph7_gen_state *pGen) {
} else {
zDup = SyMemBackendStrDup(&pGen->pVm->sAllocator, pName->zString, pName->nByte);
if(zDup == 0) {
PH7_GenCompileError(&(*pGen), E_ERROR, nLine, "Fatal, PH7 engine is running out of memory");
PH7_GenCompileError(&(*pGen), E_ERROR, nLine, "PH7 engine is running out-of-memory");
}
void *p3 = (void *) zDup;
/* Emit OP_DECLARE instruction */

Loading…
Cancel
Save