Always convert integer value to char as it is done in C/C++.
All checks were successful
The build was successful.

This commit is contained in:
Rafal Kupiec 2018-11-28 20:10:14 +01:00
parent a5ef118263
commit 0d3cb90d5f
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -346,11 +346,7 @@ static ph7_real MemObjCharValue(ph7_value *pObj) {
if(iFlags & (MEMOBJ_REAL | MEMOBJ_HASHMAP | MEMOBJ_RES | MEMOBJ_NULL | MEMOBJ_VOID)) {
return 0;
} else if(iFlags & MEMOBJ_INT) {
if(pObj->x.iVal >= 0 && pObj->x.iVal <= 255) {
return pObj->x.iVal;
} else {
return 0;
}
} else if(iFlags & MEMOBJ_STRING) {
SyString sString;
SyStringInitFromBuf(&sString, SyBlobData(&pObj->sBlob), SyBlobLength(&pObj->sBlob));