Always convert integer value to char as it is done in C/C++.
All checks were successful
The build was successful.
All checks were successful
The build was successful.
This commit is contained in:
parent
a5ef118263
commit
0d3cb90d5f
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue
Block a user